"use client"
import store from '../store/store'
import {Provider} from 'react-redux';
export default function AppProvider({children}:any) {
return <Provider store={store}>{children}</Provider>
}
import './globals.scss'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import Header from "@/components/Header/Header";
import store from '../store/store'
import AppProvider from "@/provider/AppProvider";
import {auth} from "@/firebase/firebase";
const inter = Inter({ subsets: ['latin'] })
export const metadata: Metadata = {
title: 'Buy glasses or sunglasses - E-Shop',
description: 'Buy glasses or sunglasses, E-Shop',
}
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
const uid = auth.onAuthStateChanged(() => {
console.log(auth.currentUser?.uid)
})
console.log(uid)
return (
<html lang="en">
<body className={inter.className}>
<AppProvider>
<Header/>
{children}
</AppProvider>
</body>
</html>
)
}
<AppProvider>
<Home>
<Header/>
{children}
<Home>
</AppProvider>