Hossein Salari d4a2acba6e
All checks were successful
Build and Deploy Next.js + Nginx Docker Image / build-and-deploy (push) Successful in 2m53s
Build and Deploy Next.js + Nginx Docker Image / deploy (push) Successful in 6s
core: update many files
2026-02-23 13:41:29 +03:30

33 lines
1.0 KiB
JavaScript

import "@/styles/globals.css";
import { ChakraProvider } from "@chakra-ui/react";
import { QueryParamProvider } from "use-query-params";
import { NextAdapter } from "next-query-params";
import { theme } from "@/components/theme";
import { useKeycloak } from "@/contexts/KeycloakContext";
import { SWRConfig } from "swr";
import { fetcher } from "@/lib/api";
import { Fonts } from "@/components/base/global";
const Adapter = (props) => <NextAdapter {...props} shallow={true} />;
export default function App({ Component, pageProps }) {
// const { initialized, authenticated } = useKeycloak();
// if (!initialized) return <Spinner />;
// if (!authenticated) return <div>Redirecting to login...</div>;
return (
<ChakraProvider theme={theme}>
<SWRConfig value={{ fetcher }}>
<QueryParamProvider
adapter={Adapter}
options={{ enableBatching: true }}
>
<Fonts />
<Component {...pageProps} />
</QueryParamProvider>
</SWRConfig>
</ChakraProvider>
);
}