N-FIN-5: add navigation to layout

This commit is contained in:
Markus Thielker 2024-03-08 23:32:14 +01:00
parent 799655b061
commit 15f806980b
No known key found for this signature in database
12 changed files with 1056 additions and 21 deletions

View file

@ -3,13 +3,10 @@ import React from 'react';
import { getUser } from '@/auth';
import { redirect } from 'next/navigation';
import signOut from '@/lib/actions/signOut';
import { Button } from '@/components/ui/button';
import Link from 'next/link';
import { ChevronLeft } from 'lucide-react';
import { Label } from '@/components/ui/label';
import { Input } from '@/components/ui/input';
import SignOutForm from '@/components/form/signOutForm';
import { URL_HOME, URL_SIGN_IN } from '@/lib/constants';
import { URL_SIGN_IN } from '@/lib/constants';
export default async function AccountPage() {
@ -20,13 +17,8 @@ export default async function AccountPage() {
}
return (
<div className="flex min-h-screen flex-col items-center justify-center relative">
<Button variant="ghost" size="icon" className="absolute top-4 left-4" asChild>
<Link href={URL_HOME}>
<ChevronLeft/>
</Link>
</Button>
<Card className="w-full max-w-md">
<div className="flex flex-col items-center">
<Card className="w-full max-w-md mt-12">
<CardHeader>
<CardTitle>Hey, {user?.username}!</CardTitle>
<CardDescription>This is your account overview.</CardDescription>

View file

@ -0,0 +1,7 @@
export default async function CategoriesPage() {
return (
<main className="flex items-center justify-center min-h-screen text-3xl">
Categories
</main>
);
}

View file

@ -0,0 +1,7 @@
export default async function EntitiesPage() {
return (
<main className="flex items-center justify-center min-h-screen text-3xl">
Entities
</main>
);
}

View file

@ -4,6 +4,7 @@ import './globals.css';
import { cn } from '@/lib/utils';
import { Toaster } from '@/components/ui/sonner';
import React from 'react';
import Navigation from '@/components/navigation';
const inter = Inter({subsets: ['latin']});
@ -20,6 +21,7 @@ export default function RootLayout({
return (
<html lang="en">
<body className={cn('dark', inter.className)}>
<Navigation/>
<main>
{children}
<Toaster/>

View file

@ -1,17 +1,8 @@
import { Button } from '@/components/ui/button';
import { User } from 'lucide-react';
import React from 'react';
import Link from 'next/link';
import { URL_ACCOUNT } from '@/lib/constants';
export default async function Home() {
return (
<main className="flex min-h-screen flex-col items-center justify-center p-24 text-3xl space-y-4 relative">
<Button variant="ghost" size="icon" className="absolute top-4 right-4" asChild>
<Link href={URL_ACCOUNT}>
<User/>
</Link>
</Button>
<main className="flex items-center justify-center min-h-screen text-3xl">
Next Finances
</main>
);

View file

@ -0,0 +1,7 @@
export default async function PaymentsPage() {
return (
<main className="flex items-center justify-center min-h-screen text-3xl">
Payments
</main>
);
}