import { Suspense } from "react";
import { Center, Loader } from "@mantine/core";
import PageBody from "@/app/products/components/shared/PageBody/PageBody";
import { ProductsContextProvider } from "@/app/products/contexts/ProductsContext";
import PageContainer from "@/components/layout/PageContainer/PageContainer";

export default async function ProductsPage() {
    return (
        <Suspense
            fallback={
                <Center h="50vh">
                    <Loader size="lg" />
                </Center>
            }>
            <PageContainer>
                <ProductsContextProvider>
                    <PageBody />
                </ProductsContextProvider>
            </PageContainer>
        </Suspense>
    );
}
