"use client"
import localFont from "next/font/local";
import "./globals.css";
import "./css/style.css";

import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";

import TanstackProvider from "@/providers/TanstackProvider";
import { Toaster } from "sonner";
//import { useEffect } from "react";

const geistSans = localFont({
  src: "./fonts/GeistVF.woff",
  variable: "--font-geist-sans",
  weight: "100 900",
});
const geistMono = localFont({
  src: "./fonts/GeistMonoVF.woff",
  variable: "--font-geist-mono",
  weight: "100 900",
});


export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {

  return (
    <html lang="en">
      <head>
        <title>BK Pro League</title>

        <link
          rel="stylesheet"
          href="https://cdn.ckeditor.com/ckeditor5/43.0.0/ckeditor5.css"
        />
      </head>
      <body
        className={`${geistSans.variable} ${geistMono.variable} antialiased`}
      >
        <main className="flex grainy-light flex-col min-h-[calc(100vh-3.5rem-1px)]" >
          <div className='flex-1 flex flex-col h-full'>

            <TanstackProvider>
              {children}
              <Toaster position="top-right" richColors />

            </TanstackProvider>
          </div>
        </main>
      </body>
    </html>
  );
}
