Files
plane/web/core/hooks/store/use-transient.ts
guru_sainath 9715922fc1 [WEB-2103] chore: intercom trigger updates from sidebar and command palette helper actions (#5314)
* chore: handled intercom operations programatically.

* fix: app sidebar improvement

---------

Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia@plane.so>
2024-08-06 16:02:01 +05:30

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;
};