import Preloader from "../components/elements/Preloader"
import { useEffect, useState } from "react"

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 [loading, setLoading] = useState(true)
    useEffect(() => {
        setTimeout(() => {
            setLoading(false)
        }, 1000)

    }, [])
    return (<>
        {/* <SmoothScroll /> */}
        {!loading ? (
            // <ProductHome />
            <QueryClientContext>
                <Component {...pageProps} />
            </QueryClientContext>
        ) : (
            <Preloader />
        )}
    </>)
}

export default MyApp
