|
'use client'; |
|
import { Inter } from "next/font/google"; |
|
import "./globals.css"; |
|
import Sidebar from "@/components/Sidebar"; |
|
import { FilmProvider } from "@/context/FilmContext"; |
|
import { config } from "@fortawesome/fontawesome-svg-core"; |
|
import "@fortawesome/fontawesome-svg-core/styles.css"; |
|
import Header from "@/components/Header"; |
|
import { usePathname } from "next/navigation"; |
|
|
|
config.autoAddCss = false; |
|
const inter = Inter({ subsets: ["latin"] }); |
|
|
|
export default function RootLayout({ children }) { |
|
const pathname = usePathname(); |
|
const isPlayerPage = pathname.startsWith('/player/movie') || pathname.startsWith('/player/tvshow'); |
|
|
|
return ( |
|
<html lang="en"> |
|
<body className={inter.className}> |
|
<div className="app-container"> |
|
{!isPlayerPage && ( |
|
<header> |
|
<link rel="icon" href="/favicon.ico" sizes="any" /> |
|
<Sidebar /> |
|
<Header /> |
|
</header> |
|
)} |
|
<FilmProvider>{children}</FilmProvider> |
|
</div> |
|
</body> |
|
</html> |
|
); |
|
} |
|
|