diff --git a/netflix-assignment/src/app/(route)/content_details/[type]/[id]/page.tsx b/netflix-assignment/src/app/(route)/content_details/[type]/[id]/page.tsx index 7e0a86f..30e1e4d 100644 --- a/netflix-assignment/src/app/(route)/content_details/[type]/[id]/page.tsx +++ b/netflix-assignment/src/app/(route)/content_details/[type]/[id]/page.tsx @@ -3,7 +3,7 @@ import { useFetchDetails } from "@/hooks/useFetchDetails"; import { useEffect, useState } from "react"; import { usePathname } from "next/navigation"; -import RightArrow from '@/assets/svg/RightArrow.svg'; +import RightArrow from '@/public/svg/RightArrow.svg'; export default function DetailPage() { diff --git a/netflix-assignment/src/app/(route)/home/_components/Header.tsx b/netflix-assignment/src/app/(route)/home/_components/Header.tsx index 243cf64..4d81ee3 100644 --- a/netflix-assignment/src/app/(route)/home/_components/Header.tsx +++ b/netflix-assignment/src/app/(route)/home/_components/Header.tsx @@ -1,9 +1,9 @@ "use client" import { useEffect, useState } from "react"; -import { Movie } from "@/types/movie"; -import Top10 from "../../../../assets/svg/Top10.svg"; import { useFetchAllMovies } from "@/hooks/useFetchContents"; +import { Movie } from "@/types/movie"; +import Top10 from "@/public/svg/Top10.svg"; import Link from "next/link"; export default function Header() { diff --git a/netflix-assignment/src/app/(route)/home/_components/MovieCategory.tsx b/netflix-assignment/src/app/(route)/home/_components/MovieCategory.tsx index 7998fe9..030eeec 100644 --- a/netflix-assignment/src/app/(route)/home/_components/MovieCategory.tsx +++ b/netflix-assignment/src/app/(route)/home/_components/MovieCategory.tsx @@ -1,6 +1,6 @@ "use client" -import { movieCategories } from '../../../../data/categories'; +import { movieCategories } from '@/data/categories'; import ContentRow from './ContentRow'; import { useFetchAllMovies } from '@/hooks/useFetchContents'; diff --git a/netflix-assignment/src/app/(route)/home/_components/NavBar.tsx b/netflix-assignment/src/app/(route)/home/_components/NavBar.tsx index 0528889..9749804 100644 --- a/netflix-assignment/src/app/(route)/home/_components/NavBar.tsx +++ b/netflix-assignment/src/app/(route)/home/_components/NavBar.tsx @@ -1,4 +1,4 @@ -import Logo from '../../../../assets/svg/home-logo.svg'; +import Logo from '@/public/svg/home-logo.svg'; export default function NavBar() { return ( diff --git a/netflix-assignment/src/app/(route)/home/_components/Preview.tsx b/netflix-assignment/src/app/(route)/home/_components/Preview.tsx index de1d647..a55ec90 100644 --- a/netflix-assignment/src/app/(route)/home/_components/Preview.tsx +++ b/netflix-assignment/src/app/(route)/home/_components/Preview.tsx @@ -1,6 +1,6 @@ "use client" -import { Movie } from '../../../../types/movie'; +import { Movie } from '@/types/movie'; import { TvShow } from '@/types/tvshows'; import { useFetchAllMovies, useFetchAllTvShows } from '@/hooks/useFetchContents'; import Link from 'next/link'; diff --git a/netflix-assignment/src/app/(route)/home/_components/Span.tsx b/netflix-assignment/src/app/(route)/home/_components/Span.tsx index 9b9bcca..a30b18e 100644 --- a/netflix-assignment/src/app/(route)/home/_components/Span.tsx +++ b/netflix-assignment/src/app/(route)/home/_components/Span.tsx @@ -1,6 +1,6 @@ -import Plus from '../../../../assets/svg/Plus.svg'; -import Info from '../../../../assets/svg/Info.svg'; -import RightArrow from '../../../../assets/svg/RightArrow.svg'; +import Plus from '@/public/svg/Plus.svg'; +import Info from '@/public//svg/Info.svg'; +import RightArrow from '@/public//svg/RightArrow.svg'; export default function Span() { return ( diff --git a/netflix-assignment/src/app/(route)/home/_components/TvCategory.tsx b/netflix-assignment/src/app/(route)/home/_components/TvCategory.tsx index 9a9b9ef..eecf756 100644 --- a/netflix-assignment/src/app/(route)/home/_components/TvCategory.tsx +++ b/netflix-assignment/src/app/(route)/home/_components/TvCategory.tsx @@ -1,6 +1,6 @@ "use client" -import { tvCategories } from '../../../../data/categories'; +import { tvCategories } from '@/data/categories'; import ContentRow from './ContentRow'; import { useFetchAllTvShows } from '@/hooks/useFetchContents'; diff --git a/netflix-assignment/src/app/favicon.ico b/netflix-assignment/src/app/favicon.ico index 718d6fe..2176c74 100644 Binary files a/netflix-assignment/src/app/favicon.ico and b/netflix-assignment/src/app/favicon.ico differ diff --git a/netflix-assignment/src/app/layout.tsx b/netflix-assignment/src/app/layout.tsx index bea4087..97dfd8b 100644 --- a/netflix-assignment/src/app/layout.tsx +++ b/netflix-assignment/src/app/layout.tsx @@ -4,8 +4,11 @@ import "./globals.css"; export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "Netflix Assignment", + description: "Netflix Assignment", + icons: { + icon: '/favicon.ico', + } }; export default function RootLayout({ diff --git a/netflix-assignment/src/app/page.tsx b/netflix-assignment/src/app/page.tsx index 951e6df..fa68dc4 100644 --- a/netflix-assignment/src/app/page.tsx +++ b/netflix-assignment/src/app/page.tsx @@ -1,7 +1,7 @@ "use client" import "./style.css"; -import LogoSVG from '../assets/svg/logos_netflix.svg'; +import LogoSVG from '@/public/svg/logos_netflix.svg'; import { useRouter } from 'next/navigation'; import { useEffect } from "react"; diff --git a/netflix-assignment/src/components/Footer.tsx b/netflix-assignment/src/components/Footer.tsx index 7fab87c..2fad3e3 100644 --- a/netflix-assignment/src/components/Footer.tsx +++ b/netflix-assignment/src/components/Footer.tsx @@ -2,11 +2,11 @@ import { useEffect, useState } from 'react'; import { usePathname, useRouter } from 'next/navigation'; -import Home from '../assets/svg/Home.svg'; -import Search from '../assets/svg/Search.svg'; -import ComingSoon from '../assets/svg/ComingSoon.svg'; -import Downloads from '../assets/svg/Downloads.svg'; -import More from '../assets/svg/More.svg'; +import Home from '@/public/svg/Home.svg'; +import Search from '@/public/svg/Search.svg'; +import ComingSoon from '@/public/svg/ComingSoon.svg'; +import Downloads from '@/public/svg/Downloads.svg'; +import More from '@/public/svg/More.svg'; type NavItem = { id: number; diff --git a/netflix-assignment/src/hooks/useFetchDetails.ts b/netflix-assignment/src/hooks/useFetchDetails.ts index 10651f4..9322a99 100644 --- a/netflix-assignment/src/hooks/useFetchDetails.ts +++ b/netflix-assignment/src/hooks/useFetchDetails.ts @@ -11,5 +11,6 @@ export const useFetchDetails = (type: 'movie' | 'tv' | null, id: string | null) queryKey: ['details', type, id], queryFn: () => fetchDetails(type, id), staleTime: 1000 * 60 * 60, + enabled: !!type && !!id, // type과 id가 존재할 때만 실행 }); }; \ No newline at end of file diff --git a/netflix-assignment/src/assets/svg/ComingSoon.svg b/netflix-assignment/src/public/svg/ComingSoon.svg similarity index 100% rename from netflix-assignment/src/assets/svg/ComingSoon.svg rename to netflix-assignment/src/public/svg/ComingSoon.svg diff --git a/netflix-assignment/src/assets/svg/Downloads.svg b/netflix-assignment/src/public/svg/Downloads.svg similarity index 100% rename from netflix-assignment/src/assets/svg/Downloads.svg rename to netflix-assignment/src/public/svg/Downloads.svg diff --git a/netflix-assignment/src/assets/svg/Home.svg b/netflix-assignment/src/public/svg/Home.svg similarity index 100% rename from netflix-assignment/src/assets/svg/Home.svg rename to netflix-assignment/src/public/svg/Home.svg diff --git a/netflix-assignment/src/assets/svg/Info.svg b/netflix-assignment/src/public/svg/Info.svg similarity index 100% rename from netflix-assignment/src/assets/svg/Info.svg rename to netflix-assignment/src/public/svg/Info.svg diff --git a/netflix-assignment/src/assets/svg/More.svg b/netflix-assignment/src/public/svg/More.svg similarity index 100% rename from netflix-assignment/src/assets/svg/More.svg rename to netflix-assignment/src/public/svg/More.svg diff --git a/netflix-assignment/src/assets/svg/Plus.svg b/netflix-assignment/src/public/svg/Plus.svg similarity index 100% rename from netflix-assignment/src/assets/svg/Plus.svg rename to netflix-assignment/src/public/svg/Plus.svg diff --git a/netflix-assignment/src/assets/svg/RightArrow.svg b/netflix-assignment/src/public/svg/RightArrow.svg similarity index 100% rename from netflix-assignment/src/assets/svg/RightArrow.svg rename to netflix-assignment/src/public/svg/RightArrow.svg diff --git a/netflix-assignment/src/assets/svg/Search.svg b/netflix-assignment/src/public/svg/Search.svg similarity index 100% rename from netflix-assignment/src/assets/svg/Search.svg rename to netflix-assignment/src/public/svg/Search.svg diff --git a/netflix-assignment/src/assets/svg/Top10.svg b/netflix-assignment/src/public/svg/Top10.svg similarity index 100% rename from netflix-assignment/src/assets/svg/Top10.svg rename to netflix-assignment/src/public/svg/Top10.svg diff --git a/netflix-assignment/src/assets/svg/home-logo.svg b/netflix-assignment/src/public/svg/home-logo.svg similarity index 100% rename from netflix-assignment/src/assets/svg/home-logo.svg rename to netflix-assignment/src/public/svg/home-logo.svg diff --git a/netflix-assignment/src/assets/svg/logos_netflix.svg b/netflix-assignment/src/public/svg/logos_netflix.svg similarity index 100% rename from netflix-assignment/src/assets/svg/logos_netflix.svg rename to netflix-assignment/src/public/svg/logos_netflix.svg