40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
import Preloader from "../components/elements/Preloader"
|
|
import { useEffect, useState } from "react"
|
|
import { NextIntlClientProvider } from "next-intl"
|
|
|
|
import "/public/css/bootstrap.min.css"
|
|
import "/public/css/flaticon.css"
|
|
import "/public/css/menu.css"
|
|
import "/public/css/dropdown-effects/fade-down.css"
|
|
import "/public/css/lunar.css"
|
|
|
|
import "/public/css/animate.css"
|
|
import "/public/css/merms.css"
|
|
import "/public/css/responsive.css"
|
|
import QueryClientContext from "../components/queryclientProvider/QueryClientContext"
|
|
|
|
function MyApp({ Component, pageProps }) {
|
|
const { messages, locale, ...restPageProps } = pageProps
|
|
|
|
const [loading, setLoading] = useState(true)
|
|
useEffect(() => {
|
|
setTimeout(() => {
|
|
setLoading(false)
|
|
}, 1000)
|
|
}, [])
|
|
|
|
return (
|
|
<NextIntlClientProvider locale={locale || "en"} messages={messages || {}}>
|
|
{!loading ? (
|
|
<QueryClientContext>
|
|
<Component {...restPageProps} />
|
|
</QueryClientContext>
|
|
) : (
|
|
<Preloader />
|
|
)}
|
|
</NextIntlClientProvider>
|
|
)
|
|
}
|
|
|
|
export default MyApp
|