diff --git a/frontend/README.md b/frontend/README.md index 52c94d34..bb5d7c07 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -104,8 +104,8 @@ intended change without catching real bugs. profile page (`app/routes/`): the whole page is rendered with mocked API responses, for example searching, the suggestions when a search has no results, errors from the API, and browsing from one book to the next. -- **Hook tests** for `useBookSearchParams`, `usePageParam`, `useCountUp` and - `useDataIsDelayed`. +- **Hook tests** for `useBookSearchParams`, `usePageParam`, `useCountUp`, + `useDataIsDelayed` and `useLogOut`. - **Snapshot test** for `BookCard`. The rendered HTML is stored in `__snapshots__/` next to the test and compared on every run. If a markup change is intended, update the snapshot with `pnpm test -u`. diff --git a/frontend/app/components/Header/Header.tsx b/frontend/app/components/Header/Header.tsx index c62c5d66..f8711ca5 100644 --- a/frontend/app/components/Header/Header.tsx +++ b/frontend/app/components/Header/Header.tsx @@ -3,10 +3,12 @@ import { authClient } from "~/api/auth"; import { MobileHeaderMenu } from "~/components/MobileHeaderMenu/MobileHeaderMenu"; import { Button, buttonVariants } from "~/components/ui/Button"; import { DarkModeToggle } from "~/components/ui/DarkModeToggle"; +import { useLogOut } from "~/hooks/useLogOut"; import { cn } from "~/lib/utils"; function Header() { const { data: session, isPending } = authClient.useSession(); + const logOut = useLogOut(); return (
@@ -52,10 +54,7 @@ function Header() {