feat: citizenship applications

This commit is contained in:
Ivan Rezchikov
2026-06-23 19:03:10 +03:00
parent 58ec75c948
commit c60ab9e8f9
44 changed files with 1254 additions and 130 deletions
+30
View File
@@ -0,0 +1,30 @@
"use client"
import { useTransition } from "react";
import { Button } from "@/components/ui/button";
import { Spinner } from "@/components/ui/spinner";
import { toast } from "sonner";
import { updateUserAction } from "@/lib/user/actions";
export function UpdateButton() {
const [isPending, startTransition] = useTransition();
return (
<Button
variant="secondary"
disabled={isPending}
onClick={() =>
startTransition(async () => {
try {
await updateUserAction();
toast.success("Profile updated");
} catch {
toast.error("Failed to update profile. Your session may have expired. Try signing in again.");
}
})
}
>
{isPending && <Spinner />}Update
</Button>
);
}