import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "@/shared/libs/shadcn/ui/alert-dialog"; import { Spinner } from "@/shared/libs/shadcn/ui/spinner"; import { logout } from "@/shared/models/auth/logout"; import { Button } from "@base-ui/react"; import React from "react"; const LogoutAlert = ({ openState, setOpenState, }: { openState: boolean; setOpenState: React.Dispatch>; }) => { const [isLoading, setIsLoading] = React.useState(false); const continueLogout = async () => { setIsLoading(true); await logout().then((res) => res.success ? window.location.reload() : setIsLoading(false), ); }; return ( setOpenState(false)}> Are you sure? This action will log you out of your account. You can log back in at any time. Do you want to proceed? setOpenState(false)} > Cancel ); }; export default LogoutAlert;