mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: wrap the project auth wrapper with observer (#2459)
This commit is contained in:
parent
a49fedf69e
commit
732e33fefc
@ -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<IProjectAuthWrapper> = (props) => {
|
||||
export const ProjectAuthWrapper: FC<IProjectAuthWrapper> = observer((props) => {
|
||||
const { children } = props;
|
||||
// store
|
||||
const { user: userStore, project: projectStore } = useMobxStore();
|
||||
@ -88,4 +89,4 @@ export const ProjectAuthWrapper: FC<IProjectAuthWrapper> = (props) => {
|
||||
}
|
||||
|
||||
return <>{children}</>;
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user