Skip to content

Commit

Permalink
feat: Add aliases and new files for mocking in storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
seonghunYang committed Mar 27, 2024
1 parent b0c0a63 commit 8a8dcd1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const config: StorybookConfig = {
config.resolve.alias = {
...config.resolve.alias,
'@': path.resolve(__dirname, '../'),
'next/headers': path.resolve(__dirname, '../app/utils/test/__mock__/next/headers.ts'),
};
}
return config;
Expand Down
11 changes: 11 additions & 0 deletions app/(sub-page)/sign-in/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import ContentContainer from '@/app/ui/view/atom/content-container';
import SignInForm from '@/app/ui/user/sign-in-form/sign-in-form';

// Refactor: fallback 스켈레톤으로 대체
export default function Page() {
return (
<ContentContainer className="md:w-[768px]">
<SignInForm />
</ContentContainer>
);
}
6 changes: 6 additions & 0 deletions app/utils/test/__mock__/next/headers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function cookies() {
return {
set: () => {},
get: () => {},
};
}

0 comments on commit 8a8dcd1

Please sign in to comment.