Moved login and primitive error popups to auth hook
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import type { PropsWithChildren } from "react";
|
||||
import { useNavigate } from "react-router";
|
||||
import { useAuth } from "~/hooks/auth";
|
||||
import { Button, Modal, Spinner } from "@heroui/react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Button, Modal, Spinner, Alert } from "@heroui/react";
|
||||
|
||||
export default function Guard({ children }: PropsWithChildren) {
|
||||
const { user, loading, login, logout } = useAuth();
|
||||
|
||||
@@ -16,7 +16,6 @@ export default function User() {
|
||||
return (
|
||||
<Button isPending={true}>
|
||||
<Spinner color="current" size="md" />
|
||||
Loading...
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user