2023-11-26 04:17:08 -06:00
|
|
|
import React from "react";
|
2023-01-29 12:12:36 -06:00
|
|
|
import "@/styles/globals.css";
|
2023-12-16 08:08:52 -06:00
|
|
|
import 'bootstrap-icons/font/bootstrap-icons.css';
|
2023-02-06 11:59:23 -06:00
|
|
|
import { SessionProvider } from "next-auth/react";
|
2023-01-29 12:12:36 -06:00
|
|
|
import type { AppProps } from "next/app";
|
2023-03-28 02:31:50 -05:00
|
|
|
import Head from "next/head";
|
2023-04-30 15:54:40 -05:00
|
|
|
import AuthRedirect from "@/layouts/AuthRedirect";
|
2023-06-26 17:33:40 -05:00
|
|
|
import { Toaster } from "react-hot-toast";
|
2023-07-08 05:35:43 -05:00
|
|
|
import { Session } from "next-auth";
|
2023-01-22 15:39:35 -06:00
|
|
|
|
2023-07-08 05:35:43 -05:00
|
|
|
export default function App({
|
|
|
|
Component,
|
|
|
|
pageProps,
|
|
|
|
}: AppProps<{
|
|
|
|
session: Session;
|
|
|
|
}>) {
|
2023-01-22 15:39:35 -06:00
|
|
|
return (
|
2023-11-06 07:25:57 -06:00
|
|
|
<SessionProvider
|
|
|
|
session={pageProps.session}
|
|
|
|
refetchOnWindowFocus={false}
|
|
|
|
basePath="/api/v1/auth"
|
|
|
|
>
|
2023-03-28 02:31:50 -05:00
|
|
|
<Head>
|
|
|
|
<title>Linkwarden</title>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<link
|
|
|
|
rel="apple-touch-icon"
|
|
|
|
sizes="180x180"
|
|
|
|
href="/apple-touch-icon.png"
|
|
|
|
/>
|
|
|
|
<link
|
|
|
|
rel="icon"
|
|
|
|
type="image/png"
|
|
|
|
sizes="32x32"
|
|
|
|
href="/favicon-32x32.png"
|
|
|
|
/>
|
|
|
|
<link
|
|
|
|
rel="icon"
|
|
|
|
type="image/png"
|
|
|
|
sizes="16x16"
|
|
|
|
href="/favicon-16x16.png"
|
|
|
|
/>
|
|
|
|
<link rel="manifest" href="/site.webmanifest" />
|
|
|
|
</Head>
|
2023-04-30 15:54:40 -05:00
|
|
|
<AuthRedirect>
|
2023-11-24 02:06:33 -06:00
|
|
|
<Toaster
|
|
|
|
position="top-center"
|
|
|
|
reverseOrder={false}
|
|
|
|
toastOptions={{
|
|
|
|
className:
|
2023-12-04 09:24:45 -06:00
|
|
|
"border border-sky-100 dark:border-neutral-700 dark:bg-neutral-800 dark:text-white",
|
2023-11-24 02:06:33 -06:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Component {...pageProps} />
|
2023-04-30 15:54:40 -05:00
|
|
|
</AuthRedirect>
|
2023-02-06 11:59:23 -06:00
|
|
|
</SessionProvider>
|
2023-01-22 15:39:35 -06:00
|
|
|
);
|
|
|
|
}
|