diff --git a/web/layouts/auth-layout/project-wrapper.tsx b/web/layouts/auth-layout/project-wrapper.tsx index 1ae3e71f6..f594dcd8e 100644 --- a/web/layouts/auth-layout/project-wrapper.tsx +++ b/web/layouts/auth-layout/project-wrapper.tsx @@ -1,5 +1,6 @@ import { FC, ReactNode } from "react"; import { useRouter } from "next/router"; +import { observer } from "mobx-react-lite"; import useSWR from "swr"; // hooks import { useMobxStore } from "lib/mobx/store-provider"; @@ -14,7 +15,7 @@ interface IProjectAuthWrapper { children: ReactNode; } -export const ProjectAuthWrapper: FC = (props) => { +export const ProjectAuthWrapper: FC = observer((props) => { const { children } = props; // store const { user: userStore, project: projectStore } = useMobxStore(); @@ -88,4 +89,4 @@ export const ProjectAuthWrapper: FC = (props) => { } return <>{children}; -}; +});