From ad69ebe4a0081ca7fede7c740ecd32849bc51a5d Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Tue, 14 May 2024 19:10:30 -0400 Subject: [PATCH] [21/n][Storybook] AuthPage --- .../stories/Pages/Auth/AuthPage.stories.tsx | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 packages/frontend/src/stories/Pages/Auth/AuthPage.stories.tsx diff --git a/packages/frontend/src/stories/Pages/Auth/AuthPage.stories.tsx b/packages/frontend/src/stories/Pages/Auth/AuthPage.stories.tsx new file mode 100644 index 00000000..4cf8eb76 --- /dev/null +++ b/packages/frontend/src/stories/Pages/Auth/AuthPage.stories.tsx @@ -0,0 +1,45 @@ +import type { Meta, StoryObj } from '@storybook/react'; +import { + reactRouterParameters, + withRouter, +} from 'storybook-addon-remix-react-router'; + +import AuthPage from 'pages/AuthPage'; + +const meta: Meta = { + title: 'Pages/Auth/AuthPage', + component: AuthPage, + tags: ['autodocs'], +}; + +export default meta; + +type Story = StoryObj; + +export const Login: Story = { + decorators: [withRouter], + parameters: { + reactRouter: reactRouterParameters({ + location: { + pathParams: { userId: 'me' }, + }, + routing: { + path: '/login', + }, + }), + }, +}; + +export const SignUp: Story = { + decorators: [withRouter], + parameters: { + reactRouter: reactRouterParameters({ + location: { + pathParams: { userId: 'me' }, + }, + routing: { + path: '/signup', + }, + }), + }, +};