Learning about modal in next

This commit is contained in:
2024-05-15 16:28:27 +04:00
parent 0563abd669
commit d7f152c46a
6 changed files with 86 additions and 68 deletions

View File

@@ -0,0 +1,3 @@
export default function Login() {
return <>123</>;
}

View File

@@ -0,0 +1,3 @@
export default function CatchAll() {
return null;
}

3
src/app/@auth/default.ts Normal file
View File

@@ -0,0 +1,3 @@
export default function Default() {
return null;
}

View File

@@ -6,8 +6,10 @@ import { Header } from "@/widgets/header";
const inter = Inter({ subsets: ["latin"] });
export default function RootLayout({
auth,
children,
}: Readonly<{
auth: React.ReactNode;
children: React.ReactNode;
}>) {
return (
@@ -15,6 +17,7 @@ export default function RootLayout({
<html lang="ru" suppressHydrationWarning>
<body className={inter.className}>
<ThemeProvider enableSystem={false} defaultTheme="light">
{auth}
<Header />
<div className="w-full h-full max-w-[var(--app-width)] m-auto">
{children}

3
src/app/login/page.tsx Normal file
View File

@@ -0,0 +1,3 @@
export default function Login() {
return <>login page</>;
}

View File

@@ -45,10 +45,13 @@ export const Header = () => {
<div className="flex flex-col items-end">
<span className="flex items-center mb-1 ">
<SchemeSwitch />
<span className="cursor-pointer flex items-center">
<Link
href="/login"
className="group/login cursor-pointer flex items-center"
>
<PersonIcon className="mr-1 h-4 w-4" />
Войти
</span>
<span className="group-hover/login:underline">Войти</span>
</Link>
</span>
<label className="flex flex-col items-start relative w-36">
<input