mirror of
https://gitbruv.vercel.app/api/git/bruv/gitbruv.git
synced 2025-12-20 23:24:09 +01:00
wip
This commit is contained in:
parent
a63628e659
commit
dffc97239e
17 changed files with 1220 additions and 24 deletions
55
app/(main)/settings/account/page.tsx
Normal file
55
app/(main)/settings/account/page.tsx
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
import { redirect } from "next/navigation";
|
||||
import { getCurrentUser } from "@/actions/settings";
|
||||
import { EmailForm } from "@/components/settings/email-form";
|
||||
import { PasswordForm } from "@/components/settings/password-form";
|
||||
import { DeleteAccount } from "@/components/settings/delete-account";
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
|
||||
export default async function AccountSettingsPage() {
|
||||
const user = await getCurrentUser();
|
||||
|
||||
if (!user) {
|
||||
redirect("/login");
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="space-y-8">
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>Email Address</CardTitle>
|
||||
<CardDescription>
|
||||
Change the email associated with your account
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<EmailForm currentEmail={user.email} />
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>Password</CardTitle>
|
||||
<CardDescription>
|
||||
Update your password to keep your account secure
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<PasswordForm />
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card className="border-red-500/20">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-red-500">Danger Zone</CardTitle>
|
||||
<CardDescription>
|
||||
Irreversible actions that affect your account
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<DeleteAccount username={user.username} />
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue