skl/resources/js/pages/profile/edit.tsx

75 lines
2.7 KiB
TypeScript

import AuthenticatedLayout from "@/layouts/authenticated-layout";
import DeleteUserForm from "@/pages/profile/partials/delete-user-form";
import UpdatePasswordForm from "@/pages/profile/partials/update-password-form";
import UpdateProfileInformationForm from "@/pages/profile/partials/update-profile-information-form";
import { Head } from "@inertiajs/react";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
export default function Edit({
mustVerifyEmail,
status,
}: { mustVerifyEmail: boolean; status?: string }) {
return (
<AuthenticatedLayout
header={'Edit Profile'}
>
<Head title="Profile" />
<div className="space-y-6">
<Card>
<CardHeader>
<CardTitle>Profile Information</CardTitle>
<CardDescription>
Update your account's profile information and email
address.
</CardDescription>
</CardHeader>
<CardContent>
<UpdateProfileInformationForm
mustVerifyEmail={mustVerifyEmail}
status={status}
className="max-w-xl"
/>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Update Password</CardTitle>
<CardDescription>
Ensure your account is using a long, random password
to stay secure.
</CardDescription>
</CardHeader>
<CardContent>
<UpdatePasswordForm className="max-w-xl" />
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Delete Account</CardTitle>
<CardDescription>
Once your account is deleted, all of its resources
and data will be permanently deleted. Before
deleting your account, please download any data or
information that you wish to retain.
</CardDescription>
</CardHeader>
<CardContent>
<DeleteUserForm className="max-w-xl" />
</CardContent>
</Card>
</div>
</AuthenticatedLayout>
);
}