clean up unused code and create login callback api endpoints

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
Chloe
2024-06-22 15:09:35 +07:00
parent 93f46a3f90
commit 8333eb36fc
26 changed files with 100 additions and 426 deletions

View File

@@ -1,10 +1,10 @@
import Banner from 'components/banner';
import Navbar from 'components/layout/navbar';
import { AuthProvider } from 'contexts/auth-context';
import { GeistSans } from 'geist/font/sans';
import { ensureStartsWith } from 'lib/utils';
import { ReactNode, Suspense } from 'react';
import './globals.css';
import { AuthProvider } from 'contexts/auth-context';
const { TWITTER_CREATOR, TWITTER_SITE, SITE_NAME } = process.env;
const baseUrl = process.env.NEXT_PUBLIC_VERCEL_URL
@@ -36,7 +36,7 @@ export const metadata = {
export default async function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en" className={GeistSans.variable}>
<body className="min-h-screen bg-white text-black selection:bg-primary-muted dark:bg-neutral-900 dark:text-white dark:selection:bg-primary-emphasis dark:selection:text-white">
<body className="min-h-screen bg-white text-black selection:bg-primary-muted">
<AuthProvider>
{/* We need to have this wrapper div because the headless ui popover clickaway event is not working properly */}
{/* https://github.com/tailwindlabs/headlessui/issues/2752#issuecomment-1724096430 */}
@@ -46,7 +46,7 @@ export default async function RootLayout({ children }: { children: ReactNode })
<Navbar />
</header>
<Suspense>
<main className="main group flex-1">{children}</main>
<main>{children}</main>
</Suspense>
</div>
</AuthProvider>