mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
* chore: handled intercom operations programatically. * fix: app sidebar improvement --------- Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia@plane.so>
12 lines
395 B
TypeScript
12 lines
395 B
TypeScript
import { useContext } from "react";
|
|
// mobx store
|
|
import { StoreContext } from "@/lib/store-context";
|
|
// types
|
|
import { ITransientStore } from "@/store/transient.store";
|
|
|
|
export const useTransient = (): ITransientStore => {
|
|
const context = useContext(StoreContext);
|
|
if (context === undefined) throw new Error("useTransient must be used within StoreProvider");
|
|
return context.transient;
|
|
};
|