Refactor UI components and replace PageHeader with AccountLayoutHeader
This commit includes a major refactor of UI components to enhance the overall look and feel of the platform. The PageHeader component has been replaced by AccountLayoutHeader across multiple pages including settings, members, and billing. The new AccountLayoutHeader also includes an additional `account` prop, enhancing the component's functionality. Furthermore, this commit includes modifications to the marketing page styling, ensuring better spacing and alignment of features.
This commit is contained in:
@@ -6,17 +6,18 @@ import {
|
||||
} from '@kit/billing-gateway/components';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@kit/ui/alert';
|
||||
import { If } from '@kit/ui/if';
|
||||
import { PageBody, PageHeader } from '@kit/ui/page';
|
||||
import { PageBody } from '@kit/ui/page';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
import { cn } from '@kit/ui/utils';
|
||||
|
||||
import { createBillingPortalSession } from '~/(dashboard)/home/[account]/billing/server-actions';
|
||||
import billingConfig from '~/config/billing.config';
|
||||
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
|
||||
import { withI18n } from '~/lib/i18n/with-i18n';
|
||||
|
||||
import { AccountLayoutHeader } from '../_components/account-layout-header';
|
||||
import { loadTeamAccountBillingPage } from '../_lib/server/team-account-billing-page.loader';
|
||||
import { loadTeamWorkspace } from '../_lib/server/team-account-workspace.loader';
|
||||
import { createBillingPortalSession } from '../billing/server-actions';
|
||||
import { TeamAccountCheckoutForm } from './_components/team-account-checkout-form';
|
||||
|
||||
interface Params {
|
||||
@@ -71,9 +72,10 @@ async function TeamAccountBillingPage({ params }: Params) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageHeader
|
||||
<AccountLayoutHeader
|
||||
title={<Trans i18nKey={'common:billingTabLabel'} />}
|
||||
description={<Trans i18nKey={'common:billingTabDescription'} />}
|
||||
account={params.account}
|
||||
/>
|
||||
|
||||
<PageBody>
|
||||
|
||||
@@ -17,13 +17,14 @@ import {
|
||||
CardTitle,
|
||||
} from '@kit/ui/card';
|
||||
import { If } from '@kit/ui/if';
|
||||
import { PageBody, PageHeader } from '@kit/ui/page';
|
||||
import { PageBody } from '@kit/ui/page';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
|
||||
import { Database } from '~/lib/database.types';
|
||||
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
|
||||
import { withI18n } from '~/lib/i18n/with-i18n';
|
||||
|
||||
import { AccountLayoutHeader } from '../_components/account-layout-header';
|
||||
import { loadTeamWorkspace } from '../_lib/server/team-account-workspace.loader';
|
||||
|
||||
interface Params {
|
||||
@@ -108,9 +109,10 @@ async function TeamAccountMembersPage({ params }: Params) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageHeader
|
||||
<AccountLayoutHeader
|
||||
title={<Trans i18nKey={'common:membersTabLabel'} />}
|
||||
description={<Trans i18nKey={'common:membersTabDescription'} />}
|
||||
account={params.account}
|
||||
/>
|
||||
|
||||
<PageBody>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { TeamAccountSettingsContainer } from '@kit/team-accounts/components';
|
||||
import { PageBody, PageHeader } from '@kit/ui/page';
|
||||
import { PageBody } from '@kit/ui/page';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
|
||||
import pathsConfig from '~/config/paths.config';
|
||||
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
|
||||
|
||||
import { AccountLayoutHeader } from '../_components/account-layout-header';
|
||||
import { loadTeamWorkspace } from '../_lib/server/team-account-workspace.loader';
|
||||
|
||||
export const generateMetadata = async () => {
|
||||
@@ -39,9 +40,10 @@ async function TeamAccountSettingsPage(props: Props) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageHeader
|
||||
<AccountLayoutHeader
|
||||
title={<Trans i18nKey={'teams:settings.pageTitle'} />}
|
||||
description={<Trans i18nKey={'teams:settings.pageDescription'} />}
|
||||
account={props.params.account}
|
||||
/>
|
||||
|
||||
<PageBody>
|
||||
|
||||
Reference in New Issue
Block a user