mirror of
https://github.com/gosticks/plane.git
synced 2025-10-16 12:45:33 +00:00
* fix: layout structure in admin * fix: layout structure in admin * fix: delete layout files * chore: updated form related info * fix: admin import statements * fix: general page unauthorized flickering issue * chore: logs related * chore: lock file updates * fix: build errors * fix: coderabbit suggestions
11 lines
358 B
TypeScript
11 lines
358 B
TypeScript
import { useContext } from "react";
|
|
// store
|
|
import { StoreContext } from "@/app/(all)/store.provider";
|
|
import { IUserStore } from "@/store/user.store";
|
|
|
|
export const useUser = (): IUserStore => {
|
|
const context = useContext(StoreContext);
|
|
if (context === undefined) throw new Error("useUser must be used within StoreProvider");
|
|
return context.user;
|
|
};
|