import { useEffect, useState } from "react"; import { useTheme } from "next-themes"; // hooks import useUserAuth from "hooks/use-user-auth"; // layouts import { WorkspaceAuthorizationLayout } from "layouts/auth-layout"; import SettingsNavbar from "layouts/settings-navbar"; // components import { CustomThemeSelector, ThemeSwitch } from "components/core"; // ui import { Spinner } from "components/ui"; import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; // types import { ICustomTheme } from "types"; const ProfilePreferences = () => { const { user: myProfile } = useUserAuth(); const { theme } = useTheme(); const [customThemeSelectorOptions, setCustomThemeSelectorOptions] = useState(false); const [preLoadedData, setPreLoadedData] = useState(null); useEffect(() => { if (theme === "custom") { if (myProfile?.theme.palette) setPreLoadedData(myProfile.theme); if (!customThemeSelectorOptions) setCustomThemeSelectorOptions(true); } }, [myProfile, theme, customThemeSelectorOptions]); return ( } > {myProfile ? (

Profile Settings

This information will be visible to only you.

Theme

Select or customize your interface color scheme.

{customThemeSelectorOptions && }
) : (
)}
); }; export default ProfilePreferences;