diff --git a/assets/pasted-20260415-150837-fa591359.png b/assets/pasted-20260415-150837-fa591359.png new file mode 100644 index 0000000..6654b4c Binary files /dev/null and b/assets/pasted-20260415-150837-fa591359.png differ diff --git a/backend/src/config.js b/backend/src/config.js index fef0a57..19259af 100644 --- a/backend/src/config.js +++ b/backend/src/config.js @@ -69,7 +69,7 @@ const config = { config.pexelsKey = process.env.PEXELS_KEY || ''; -config.pexelsQuery = 'Neon-lit cinema hallway'; +config.pexelsQuery = 'cozy home cinema tv popcorn'; config.host = process.env.NODE_ENV === "production" ? config.remote : "http://localhost"; config.apiUrl = `${config.host}${config.port ? `:${config.port}` : ``}/api`; config.swaggerUrl = `${config.swaggerUI}${config.swaggerPort}`; diff --git a/frontend/src/pages/login.tsx b/frontend/src/pages/login.tsx index da82ec2..f3e5feb 100644 --- a/frontend/src/pages/login.tsx +++ b/frontend/src/pages/login.tsx @@ -20,7 +20,7 @@ import { findMe, loginUser, resetAction } from '../stores/authSlice'; import { useAppDispatch, useAppSelector } from '../stores/hooks'; import Link from 'next/link'; import {toast, ToastContainer} from "react-toastify"; -import { getPexelsImage, getPexelsVideo } from '../helpers/pexels' +import { getPexelsImage } from '../helpers/pexels' export default function Login() { const router = useRouter(); @@ -28,15 +28,13 @@ export default function Login() { const textColor = useAppSelector((state) => state.style.linkColor); const iconsColor = useAppSelector((state) => state.style.iconsColor); const notify = (type, msg) => toast(msg, { type }); - const [ illustrationImage, setIllustrationImage ] = useState({ - src: undefined, - photographer: undefined, - photographer_url: undefined, - }) - const [ illustrationVideo, setIllustrationVideo ] = useState({video_files: []}) - const [contentType, setContentType] = useState('video'); - const [contentPosition, setContentPosition] = useState('left'); - const [showPassword, setShowPassword] = useState(false); + const [illustrationImage, setIllustrationImage] = useState({ + src: undefined, + photographer: undefined, + photographer_url: undefined, + }); + const contentPosition = 'left'; + const [showPassword, setShowPassword] = useState(false); const { currentUser, isFetching, errorMessage, token, notify:notifyState } = useAppSelector( (state) => state.auth, ); @@ -46,15 +44,14 @@ export default function Login() { const title = 'Movies & TV Tracker' - // Fetch Pexels image/video - useEffect( () => { - async function fetchData() { - const image = await getPexelsImage() - const video = await getPexelsVideo() - setIllustrationImage(image); - setIllustrationVideo(video); - } - fetchData(); + // Fetch a single movie-themed illustration for the login page + useEffect(() => { + async function fetchData() { + const image = await getPexelsImage(); + setIllustrationImage(image); + } + + fetchData(); }, []); // Fetch user data useEffect(() => { @@ -101,46 +98,44 @@ export default function Login() { }; const imageBlock = (image) => ( -
+ Save your watchlist, discover what to stream next, and keep your entertainment world organized. +
+Tonight's vibe
+Big screen energy with a premium streaming feel.
++ Photo by{' '} + + {image?.photographer || 'Pexels'} + + {' '}on Pexels +
+