mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
13 lines
355 B
TypeScript
13 lines
355 B
TypeScript
import { ReactNode } from "react";
|
|
import { observer } from "mobx-react-lite";
|
|
import useSWR from "swr";
|
|
import { useUser } from "@/hooks/store";
|
|
|
|
export const UserProvider = observer(({ children }: { children: ReactNode }) => {
|
|
const { fetchCurrentUser } = useUser();
|
|
|
|
useSWR("CURRENT_USER", () => fetchCurrentUser());
|
|
|
|
return <>{children}</>;
|
|
});
|