Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:added an empty page with the route: /settings/accounts/new. #2960

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/twenty-front/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { NotFound } from '~/pages/not-found/NotFound';
import { Opportunities } from '~/pages/opportunities/Opportunities';
import { SettingsAccounts } from '~/pages/settings/accounts/SettingsAccounts';
import { SettingsAccountsEmails } from '~/pages/settings/accounts/SettingsAccountsEmails';
import { SettingsNewAccount } from '~/pages/settings/accounts/SettingsNewAccount';
import { SettingsNewObject } from '~/pages/settings/data-model/SettingsNewObject';
import { SettingsObjectDetail } from '~/pages/settings/data-model/SettingsObjectDetail';
import { SettingsObjectEdit } from '~/pages/settings/data-model/SettingsObjectEdit';
Expand Down Expand Up @@ -74,6 +75,10 @@ export const App = () => {
path={SettingsPath.Accounts}
element={<SettingsAccounts />}
/>
<Route
path={SettingsPath.NewAccount}
element={<SettingsNewAccount />}
/>
<Route
path={SettingsPath.AccountsEmails}
element={<SettingsAccountsEmails />}
Expand Down
1 change: 1 addition & 0 deletions packages/twenty-front/src/modules/types/SettingsPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export enum SettingsPath {
ProfilePage = 'profile',
Appearance = 'profile/appearance',
Accounts = 'accounts',
NewAccount = 'accounts/new',
AccountsEmails = 'accounts/emails',
Objects = 'objects',
ObjectDetail = 'objects/:objectSlug',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
import { IconSettings } from '@/ui/display/icon';
import { SubMenuTopBarContainer } from '@/ui/layout/page/SubMenuTopBarContainer';
import { Breadcrumb } from '@/ui/navigation/bread-crumb/components/Breadcrumb';

export const SettingsNewAccount = () => {
lakshay-saini-au8 marked this conversation as resolved.
Show resolved Hide resolved
return (
<SubMenuTopBarContainer Icon={IconSettings} title="Settings">
<SettingsPageContainer>
<Breadcrumb
links={[
{ children: 'Accounts', href: '/settings/accounts' },
{ children: `New` },
]}
/>
</SettingsPageContainer>
</SubMenuTopBarContainer>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Meta, StoryObj } from '@storybook/react';

import { SettingsNewAccount } from '~/pages/settings/accounts/SettingsNewAccount';
import {
PageDecorator,
PageDecoratorArgs,
} from '~/testing/decorators/PageDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';

const meta: Meta<PageDecoratorArgs> = {
title: 'Pages/Settings/Accounts/SettingsNewAccount',
component: SettingsNewAccount,
decorators: [PageDecorator],
args: {
routePath: '/settings/accounts/new',
},
parameters: {
layout: 'fullscreen',
msw: graphqlMocks,
},
};

export default meta;

export type Story = StoryObj<typeof SettingsNewAccount>;

export const Default: Story = {};
Loading