Add settings page (#273)
* Add settings page * Add 'soon' pill and logout * Refactor components and layout * Begin improving mobile display * Add stories and refactor
This commit is contained in:
23
front/src/pages/settings/__stories__/settings.stories.tsx
Normal file
23
front/src/pages/settings/__stories__/settings.stories.tsx
Normal file
@ -0,0 +1,23 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
||||
import { SettingsProfile } from '../SettingsProfile';
|
||||
|
||||
import { render } from './shared';
|
||||
|
||||
const meta: Meta<typeof SettingsProfile> = {
|
||||
title: 'Pages/SettingsProfile',
|
||||
component: SettingsProfile,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
||||
export type Story = StoryObj<typeof SettingsProfile>;
|
||||
|
||||
export const Default: Story = {
|
||||
render,
|
||||
parameters: {
|
||||
msw: graphqlMocks,
|
||||
},
|
||||
};
|
||||
22
front/src/pages/settings/__stories__/shared.tsx
Normal file
22
front/src/pages/settings/__stories__/shared.tsx
Normal file
@ -0,0 +1,22 @@
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ApolloProvider } from '@apollo/client';
|
||||
import { RecoilRoot } from 'recoil';
|
||||
|
||||
import { FullHeightStorybookLayout } from '~/testing/FullHeightStorybookLayout';
|
||||
import { mockedClient } from '~/testing/mockedClient';
|
||||
|
||||
import { SettingsProfile } from '../SettingsProfile';
|
||||
|
||||
export function render() {
|
||||
return (
|
||||
<RecoilRoot>
|
||||
<ApolloProvider client={mockedClient}>
|
||||
<MemoryRouter>
|
||||
<FullHeightStorybookLayout>
|
||||
<SettingsProfile />
|
||||
</FullHeightStorybookLayout>
|
||||
</MemoryRouter>
|
||||
</ApolloProvider>
|
||||
</RecoilRoot>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user