mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: handled onboarding step error in web app
This commit is contained in:
parent
b717d1660c
commit
85a64955b7
@ -37,6 +37,7 @@
|
||||
"nprogress": "^0.2.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-dropzone": "^14.2.3",
|
||||
"react-hook-form": "^7.38.0",
|
||||
"swr": "^2.2.2",
|
||||
"tailwind-merge": "^2.0.0",
|
||||
|
@ -24,7 +24,6 @@ export const PreferencesMobileHeader = () => {
|
||||
<Link
|
||||
key={index}
|
||||
href={link.href}
|
||||
onClick={() => console.log(router.asPath)}
|
||||
className={cn(
|
||||
"flex justify-around py-2 w-full",
|
||||
router.asPath.includes(link.label.toLowerCase()) ? "border-b-2 border-custom-primary-100" : ""
|
||||
|
@ -1,31 +0,0 @@
|
||||
import { FC, ReactNode } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// hooks
|
||||
import { useAppRouter } from "@/hooks/store";
|
||||
// components
|
||||
|
||||
export interface IAdminAuthWrapper {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export const AdminAuthWrapper: FC<IAdminAuthWrapper> = observer(({ children }) => {
|
||||
// store hooks
|
||||
const { workspaceSlug } = useAppRouter();
|
||||
// FIXME:
|
||||
// const { isUserInstanceAdmin, currentUserSettings } = useUser();
|
||||
// redirect url
|
||||
const redirectWorkspaceSlug =
|
||||
workspaceSlug ||
|
||||
// currentUserSettings?.workspace?.last_workspace_slug ||
|
||||
// currentUserSettings?.workspace?.fallback_workspace_slug ||
|
||||
"";
|
||||
|
||||
console.log("redirectWorkspaceSlug", redirectWorkspaceSlug);
|
||||
|
||||
// if user does not have admin access to the instance
|
||||
// if (isUserInstanceAdmin !== undefined && isUserInstanceAdmin === false) {
|
||||
// return <InstanceAdminRestriction redirectWorkspaceSlug={redirectWorkspaceSlug} />;
|
||||
// }
|
||||
|
||||
return <>{children}</>;
|
||||
});
|
@ -1,3 +1,2 @@
|
||||
export * from "./workspace-wrapper";
|
||||
export * from "./project-wrapper";
|
||||
export * from "./admin-wrapper";
|
||||
|
@ -141,7 +141,7 @@ const OnboardingPage: NextPageWithLayout = observer(() => {
|
||||
|
||||
handleStepChange();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [user, step, updateCurrentUser, workspacesList]);
|
||||
}, [user, step, profile.onboarding_step, updateCurrentUser, workspacesList]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -106,7 +106,6 @@ export class UserStore implements IUserStore {
|
||||
this.isLoading = false;
|
||||
this.isAuthenticated = false;
|
||||
});
|
||||
console.log("this.isLoading", this.isLoading);
|
||||
return user;
|
||||
} catch (error) {
|
||||
runInAction(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user