Moved login and primitive error popups to auth hook

This commit is contained in:
2026-07-22 23:22:53 -04:00
parent acbb878811
commit d0975354af
3 changed files with 78 additions and 4 deletions

View File

@@ -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();

View File

@@ -16,7 +16,6 @@ export default function User() {
return (
<Button isPending={true}>
<Spinner color="current" size="md" />
Loading...
</Button>
);
}