/** * Copyright (c) 2023-present Plane Software, Inc. and contributors * SPDX-License-Identifier: AGPL-3.0-only * See the LICENSE file for details. */ import { observer } from "mobx-react"; import useSWR from "swr"; import { LogoSpinner } from "@/components/common/logo-spinner"; import { OnboardingRoot } from "@/components/onboarding"; import { USER_WORKSPACES_LIST } from "@/constants/fetch-keys"; import { EPageTypes } from "@/helpers/authentication.helper"; import { useWorkspace } from "@/hooks/store/use-workspace"; import { useUser } from "@/hooks/store/user"; import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper"; function OnboardingPage() { const { data: user } = useUser(); const { fetchWorkspaces } = useWorkspace(); useSWR(USER_WORKSPACES_LIST, () => { if (user?.id) { fetchWorkspaces(); } }); return (
{user ? ( ) : (
)}
); } export default observer(OnboardingPage);