import React, { useEffect } from "react"; import "@/styles/globals.css"; import "bootstrap-icons/font/bootstrap-icons.css"; import { SessionProvider } from "next-auth/react"; import type { AppProps } from "next/app"; import Head from "next/head"; import AuthRedirect from "@/layouts/AuthRedirect"; import toast from "react-hot-toast"; import { Toaster, ToastBar } from "react-hot-toast"; import { Session } from "next-auth"; import { isPWA } from "@/lib/client/utils"; // import useInitialData from "@/hooks/useInitialData"; import { appWithTranslation } from "next-i18next"; import nextI18nextConfig from "../next-i18next.config"; function App({ Component, pageProps, }: AppProps<{ session: Session; }>) { useEffect(() => { if (isPWA()) { const meta = document.createElement("meta"); meta.name = "viewport"; meta.content = "width=device-width, initial-scale=1, maximum-scale=1"; document.getElementsByTagName("head")[0].appendChild(meta); } }, []); return ( Linkwarden {/* */} {(t) => ( {({ icon, message }) => (
{icon} {message} {t.type !== "loading" && ( )}
)}
)}
{/*
*/}
); } export default appWithTranslation(App); // function GetData({ children }: { children: React.ReactNode }) { // const status = useInitialData(); // return typeof window !== "undefined" && status !== "loading" ? ( // children // ) : ( // <> // ); // }