mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-14 16:41:17 +00:00
feat: implement user verification and rejection functionality with improved error handling ✨
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
"use client";
|
||||
import { Check, CheckCheck } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import { toast } from "sonner";
|
||||
import { VerifyUser } from "@/actions/user-actions";
|
||||
import {
|
||||
AlertDialog,
|
||||
@ -12,12 +15,9 @@ import {
|
||||
AlertDialogTrigger,
|
||||
} from "@/components/ui/alert-dialog";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import type { User } from "@/lib/types/user";
|
||||
import { Check, CheckCheck } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import { toast } from "sonner";
|
||||
import type { UserProfile } from "@/lib/types/user";
|
||||
|
||||
export function UserVerifyDialog({ user }: { user: User }) {
|
||||
export function UserVerifyDialog({ user }: { user: UserProfile }) {
|
||||
const userId = user.id;
|
||||
const [disabled, setDisabled] = useState(false);
|
||||
return (
|
||||
@ -33,7 +33,7 @@ export function UserVerifyDialog({ user }: { user: User }) {
|
||||
</AlertDialogTrigger>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Are you sure?</AlertDialogTitle>
|
||||
<AlertDialogTitle className="text-muted-foreground">Verify User</AlertDialogTitle>
|
||||
<AlertDialogDescription>
|
||||
Are you sure you want to verify the following user?
|
||||
<span className="inline-block my-4">
|
||||
|
Reference in New Issue
Block a user