import { Card, CardContent, CardFooter } from 'ui' import { PageContainer } from 'ui-patterns/PageContainer' import { PageHeader, PageHeaderDescription, PageHeaderMeta, PageHeaderSummary, PageHeaderTitle, } from 'ui-patterns/PageHeader' import { PageSection, PageSectionContent, PageSectionDescription, PageSectionMeta, PageSectionSummary, PageSectionTitle, } from 'ui-patterns/PageSection' import { ShimmeringLoader } from 'ui-patterns/ShimmeringLoader' import { AccountConnections } from '@/components/interfaces/Account/Preferences/AccountConnections' import { AccountDeletion } from '@/components/interfaces/Account/Preferences/AccountDeletion' import { AccountIdentities } from '@/components/interfaces/Account/Preferences/AccountIdentities' import { AnalyticsSettings } from '@/components/interfaces/Account/Preferences/AnalyticsSettings' import { DashboardSettings } from '@/components/interfaces/Account/Preferences/DashboardSettings' import { HotkeySettings } from '@/components/interfaces/Account/Preferences/HotkeySettings' import { ProfileInformation } from '@/components/interfaces/Account/Preferences/ProfileInformation' import { ThemeSettings } from '@/components/interfaces/Account/Preferences/ThemeSettings' import { TimezoneSettings } from '@/components/interfaces/Account/Preferences/TimezoneSettings' import AccountLayout from '@/components/layouts/AccountLayout/AccountLayout' import { AppLayout } from '@/components/layouts/AppLayout/AppLayout' import { DefaultLayout } from '@/components/layouts/DefaultLayout' import { AlertError } from '@/components/ui/AlertError' import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled' import { IS_PLATFORM } from '@/lib/constants' import { useProfile } from '@/lib/profile' import type { NextPageWithLayout } from '@/types' const User: NextPageWithLayout = () => { return IS_PLATFORM ? : } User.getLayout = (page) => ( {page} ) export default User const PreferencesPageHeader = ({ description }: { description: string }) => ( Preferences {description} ) const PlatformPreferences = () => { const { profileShowInformation, profileShowAnalyticsAndMarketing, profileShowAccountDeletion } = useIsFeatureEnabled([ 'profile:show_information', 'profile:show_analytics_and_marketing', 'profile:show_account_deletion', ]) const { error, isLoading, isError } = useProfile() return ( <> {isError && ( )} {!isError && ( <> {isLoading ? ( ) : ( <> {profileShowInformation ? : null} )} {profileShowAnalyticsAndMarketing && } {profileShowAccountDeletion && } )} ) } const ProfileLoadingSections = ({ showProfileInformation, }: { showProfileInformation: boolean }) => ( <> {showProfileInformation && ( Profile information )} Account identities Manage the providers linked to your Briven account and update their details. ) const ProfileFieldLoadingRow = ({ labelWidth, descriptionWidth, }: { labelWidth: string descriptionWidth?: string }) => (
{descriptionWidth !== undefined && ( )}
) const SelfHostedPreferences = () => { return ( <> ) }