+
+
+
+
+
+
+ );
+};
+
+const UserControlContent = () => {
+ const [isSigningOut, setIsSigningOut] = useState(false);
+ const transition = useTransition();
+ const [_, setState] = useContext(UserControlContext);
+ const { toast } = useToast();
+
+ function startSignOut() {
+ transition[1](() => {
+ setIsSigningOut(true);
+ const toasted = toast({
+ title: "Logging Out",
+ description: "Please wait until server responses",
+ status: "loading",
+ });
+ logOutServerAction().then(() => {
+ toasted.update({
+ title: "Log Out Success",
+ description: "Successfully logged out!",
+ status: "success",
+ });
+ setIsSigningOut(false);
+ setState((prev) => ({ ...prev, signIn: false }));
+ });
+ });
+ }
+
+ return (
+