mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-08 20:25:19 +02:00
refactor: migrate dashboard page from useUser to currentUserAtom
This commit is contained in:
parent
cee27f1263
commit
6b266ff128
1 changed files with 2 additions and 3 deletions
|
|
@ -35,10 +35,10 @@ import {
|
|||
} from "@/components/ui/card";
|
||||
import { Spotlight } from "@/components/ui/spotlight";
|
||||
import { Tilt } from "@/components/ui/tilt";
|
||||
import { useUser } from "@/hooks";
|
||||
import { searchSpacesAtom } from "@/atoms/search-spaces/search-space-query.atoms";
|
||||
import { deleteSearchSpaceMutationAtom } from "@/atoms/search-spaces/search-space-mutation.atoms";
|
||||
import { authenticatedFetch } from "@/lib/auth-utils";
|
||||
import { currentUserAtom } from "@/atoms/user/user-query.atoms";
|
||||
|
||||
/**
|
||||
* Formats a date string into a readable format
|
||||
|
|
@ -159,8 +159,7 @@ const DashboardPage = () => {
|
|||
const { data: searchSpaces = [], isLoading: loading, error, refetch: refreshSearchSpaces } = useAtomValue(searchSpacesAtom);
|
||||
const { mutateAsync: deleteSearchSpace } = useAtomValue(deleteSearchSpaceMutationAtom);
|
||||
|
||||
// Fetch user details
|
||||
const { user, loading: isLoadingUser, error: userError } = useUser();
|
||||
const { data: user, isPending: isLoadingUser, error: userError } = useAtomValue(currentUserAtom);
|
||||
|
||||
// Create user object for UserDropdown
|
||||
const customUser = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue