nexora / frontend /src /app /layout.js
ChandimaPrabath's picture
player test 0.1
25dca33
raw
history blame
1.06 kB
'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>
);
}