diff --git a/apps/studio/pages/account/me.tsx b/apps/studio/pages/account/me.tsx index 878ee83039..33519b9b0b 100644 --- a/apps/studio/pages/account/me.tsx +++ b/apps/studio/pages/account/me.tsx @@ -1,4 +1,4 @@ -import { Card, CardContent } from 'ui' +import { Card, CardContent, CardFooter } from 'ui' import { PageContainer } from 'ui-patterns/PageContainer' import { PageHeader, @@ -7,7 +7,15 @@ import { PageHeaderSummary, PageHeaderTitle, } from 'ui-patterns/PageHeader' -import { GenericSkeletonLoader } from 'ui-patterns/ShimmeringLoader' +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' @@ -58,20 +66,12 @@ const PlatformPreferences = () => { 'profile:show_analytics_and_marketing', 'profile:show_account_deletion', ]) - const { error, isLoading, isError, isSuccess } = useProfile() + const { error, isLoading, isError } = useProfile() return ( <> - {isLoading && ( - - - - - - )} - {isError && ( @@ -80,29 +80,110 @@ const PlatformPreferences = () => { )} - {isSuccess && ( + {!isError && ( <> - {profileShowInformation ? : null} - + {isLoading ? ( + + ) : ( + <> + {profileShowInformation ? : null} + + + )} + + + + + + + + + + {profileShowAnalyticsAndMarketing && } + + {profileShowAccountDeletion && } )} - - - - - - - - - - {profileShowAnalyticsAndMarketing && } - - {profileShowAccountDeletion && } ) } +const ProfileLoadingSections = ({ + showProfileInformation, +}: { + showProfileInformation: boolean +}) => ( + <> + {showProfileInformation && ( + + + + Profile information + + + + + + + + + + + + + + + + + + + + + + + )} + + + + + Account identities + + Manage the providers linked to your Supabase account and update their details. + + + + + + + + + + + + +) + +const ProfileFieldLoadingRow = ({ + labelWidth, + descriptionWidth, +}: { + labelWidth: string + descriptionWidth?: string +}) => ( +
+
+ +
+
+ + {descriptionWidth !== undefined && ( + + )} +
+
+) + const SelfHostedPreferences = () => { return ( <>