"use client"; import { observer } from "mobx-react-lite"; import Image from "next/image"; // ui import { useTheme } from "next-themes"; import useSWR from "swr"; import { Spinner } from "@plane/ui"; // components import { AuthRoot } from "@/components/accounts"; // hooks import { useUser } from "@/hooks/store"; // images import PlaneBackgroundPatternDark from "public/auth/background-pattern-dark.svg"; import PlaneBackgroundPattern from "public/auth/background-pattern.svg"; import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text-new.png"; export const AuthView = observer(() => { // hooks const { resolvedTheme } = useTheme(); // store const { fetchCurrentUser, isLoading } = useUser(); // fetching user information const { isLoading: isSWRLoading } = useSWR("CURRENT_USER_DETAILS", () => fetchCurrentUser(), { shouldRetryOnError: false, revalidateOnFocus: false, revalidateIfStale: false, revalidateOnReconnect: true, errorRetryCount: 1, }); return ( <> {isLoading || isSWRLoading ? (
) : ( <>
Plane background pattern
Plane Logo Plane
)} ); });