feat: implement Settings page with tabs
This commit is contained in:
parent
fc273906bd
commit
42f299c27e
1 changed files with 71 additions and 2 deletions
|
@ -1,10 +1,79 @@
|
||||||
import { RedirectButton } from '@/components/user/redirect-button';
|
//import { RedirectButton } from '@/components/user/redirect-button';
|
||||||
|
import { Button } from '@/components/ui/button';
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardFooter,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from '@/components/ui/card';
|
||||||
|
import { Input } from '@/components/ui/input';
|
||||||
|
import { Label } from '@/components/ui/label';
|
||||||
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
||||||
|
|
||||||
export default function Home() {
|
/*export default function Settings() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>Settings</h1>
|
<h1>Settings</h1>
|
||||||
<RedirectButton redirectUrl='/home' buttonText='Home' />
|
<RedirectButton redirectUrl='/home' buttonText='Home' />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
export default function Settings() {
|
||||||
|
return (
|
||||||
|
<div className='flex flex-col items-center justify-center space-y-4 h-screen'>
|
||||||
|
<Tabs defaultValue='general' className='w-[400px]'>
|
||||||
|
<TabsList className='grid w-full grid-cols-2'>
|
||||||
|
<TabsTrigger value='general'>General</TabsTrigger>
|
||||||
|
<TabsTrigger value='account'>Account</TabsTrigger>
|
||||||
|
</TabsList>
|
||||||
|
<TabsContent value='general'>
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>General</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Make changes to your account here. Click save when you're done.
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className='space-y-2'>
|
||||||
|
<div className='space-y-1'>
|
||||||
|
<Label htmlFor='name'>Name</Label>
|
||||||
|
<Input id='name' defaultValue='Pedro Duarte' />
|
||||||
|
</div>
|
||||||
|
<div className='space-y-1'>
|
||||||
|
<Label htmlFor='username'>Username</Label>
|
||||||
|
<Input id='username' defaultValue='@peduarte' />
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter>
|
||||||
|
<Button>Save changes</Button>
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
</TabsContent>
|
||||||
|
<TabsContent value='account'>
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle>Account Settings</CardTitle>
|
||||||
|
<CardDescription></CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className='space-y-2'>
|
||||||
|
<div className='space-y-1'>
|
||||||
|
<Label htmlFor='current'>Current password</Label>
|
||||||
|
<Input id='current' type='password' />
|
||||||
|
</div>
|
||||||
|
<div className='space-y-1'>
|
||||||
|
<Label htmlFor='new'>New password</Label>
|
||||||
|
<Input id='new' type='password' />
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter>
|
||||||
|
<Button>Save password</Button>
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
</TabsContent>
|
||||||
|
</Tabs>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue