mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-29 10:56:24 +02:00
refactor: migrate app-sidebar from useUser to currentUserAtom
This commit is contained in:
parent
2e0f59522a
commit
8691ba9d72
1 changed files with 3 additions and 2 deletions
|
|
@ -38,7 +38,8 @@ import {
|
|||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
} from "@/components/ui/dropdown-menu";
|
||||
import { useUser } from "@/hooks/use-user";
|
||||
import { useAtomValue } from "jotai";
|
||||
import { currentUserAtom } from "@/atoms/user/user-query.atoms";
|
||||
|
||||
/**
|
||||
* Generates a consistent color based on a string (email)
|
||||
|
|
@ -262,7 +263,7 @@ export const AppSidebar = memo(function AppSidebar({
|
|||
}: AppSidebarProps) {
|
||||
const router = useRouter();
|
||||
const { theme, setTheme } = useTheme();
|
||||
const { user, loading: isLoadingUser } = useUser();
|
||||
const { data: user, isPending: isLoadingUser } = useAtomValue(currentUserAtom);
|
||||
const [isClient, setIsClient] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue