From 1ae274a658d0a705b698a8873c286ec73403b1a6 Mon Sep 17 00:00:00 2001 From: polwex Date: Thu, 15 May 2025 12:17:54 +0700 Subject: m --- src/components/Profile.tsx | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/components/Profile.tsx (limited to 'src/components/Profile.tsx') diff --git a/src/components/Profile.tsx b/src/components/Profile.tsx new file mode 100644 index 0000000..2ae73e9 --- /dev/null +++ b/src/components/Profile.tsx @@ -0,0 +1,36 @@ +"use client"; + +import { postLogout } from "@/actions/login"; +import { Button } from "@/components/ui/button"; +import { + Card, + CardHeader, + CardDescription, + CardContent, + CardFooter, + CardTitle, +} from "@/components/ui/card"; +import { Label } from "@/components/ui/label"; +import { Input } from "@/components/ui/input"; +import { useActionState } from "react"; + +export default function ({ user }: { user: { name: string; id: number } }) { + const [state, formAction, isPending] = useActionState(postLogout, 0); + return ( +
+ + + Profile + {state} + + +

Username: {user.name}

+

User ID: {user.id}

+
+ + + +
+
+ ); +} -- cgit v1.2.3