Skip to content

Commit 8ab9373

Browse files
authored
Merge pull request #176 from CodeitFESI4-Team1/Fix/170/storybook-build-err
Fix/170/storybook build err
2 parents aaade89 + a2ea0c7 commit 8ab9373

File tree

12 files changed

+152
-29
lines changed

12 files changed

+152
-29
lines changed

src/app/(auth)/login/_components/login-form.stories.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ import LoginForm, { LoginFormValues } from './login-form';
66
const meta: Meta = {
77
title: 'auth/login-form',
88
component: LoginForm,
9+
tags: ['autodocs'],
10+
parameters: {
11+
docs: {
12+
subtitle: '로그인시 사용되는 폼',
13+
description: {
14+
component:
15+
'포커스 이동 또는 입력 1초 이후에 이메일 형식, 비밀번호 8자이상 유효성 검사가 실행됩니다.',
16+
},
17+
},
18+
},
919
};
1020

1121
export default meta;

src/app/(auth)/signup/_components/signup-form.stories.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ import SignupForm, { SignupFormValues } from './signup-form';
66
const meta: Meta = {
77
title: 'auth/signup-form',
88
component: SignupForm,
9+
tags: ['autodocs'],
10+
parameters: {
11+
docs: {
12+
subtitle: '회원가입시 사용되는 폼',
13+
description: {
14+
component:
15+
'포커스 이동 또는 입력 1초 이후에 이메일 형식, 비밀번호 8자이상, 비밀번호 확인 유효성 검사가 실행됩니다.',
16+
},
17+
},
18+
},
919
};
1020

1121
export default meta;

src/app/(crew)/_components/category/internal-category/internal-category.stories.tsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,24 @@ const meta: Meta = {
77
title: 'layout/category',
88
component: InternalCategory,
99
tags: ['autodocs'],
10+
parameters: {
11+
docs: {
12+
subtitle: '운동 종목별 카테고리',
13+
description: {
14+
component: '크루찾기 페이지에서 운동 대종목 선택에 따라, 세부 카테고리를 보여줍니다.',
15+
},
16+
},
17+
},
1018
argTypes: {
1119
category: {
12-
description: '세부 카테고리 이름 배열',
20+
description: '카테고리 이름 배열',
1321
},
1422
},
1523
};
1624

1725
export default meta;
1826

19-
const Template: StoryFn<InternalCategoryProps> = function InternalCategoryStory() {
27+
const Template: StoryFn = function InternalCategoryStory() {
2028
const [subCategory, setSubCategory] = useState('running');
2129

2230
return (
@@ -28,12 +36,5 @@ const Template: StoryFn<InternalCategoryProps> = function InternalCategoryStory(
2836
);
2937
};
3038

31-
export const Category1 = Template.bind({});
32-
Category1.args = {
33-
category: categoryData[0].items,
34-
};
35-
36-
export const Category2 = Template.bind({});
37-
Category2.args = {
38-
category: categoryData[1].items,
39-
};
39+
export const Default = Template.bind({});
40+
Default.args = {};

src/app/(crew)/favicon.ico

-25.3 KB
Binary file not shown.

src/app/(crew)/my-gathering/hosted/page.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ export default function MyGatheringHostedPage() {
2525
refetch();
2626
}, [selectedDate]);
2727

28+
if (hostedGatheringList?.length === 0) {
29+
return (
30+
<section className="py-16 text-center">
31+
<h3 className="text-xl font-bold text-blue-500">내가 만든 약속이 아직 없어요</h3>
32+
<p className="mt-4 text-gray-600">크루에서 약속을 만들어보세요 🙌</p>
33+
</section>
34+
);
35+
}
36+
2837
return (
2938
<div>
3039
<div className="py-4 md:py-6">

src/app/(crew)/my-gathering/joined/page.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ export default function MyGatheringJoinedPage() {
2525
refetch();
2626
}, [selectedDate]);
2727

28+
if (joinedGatheringList?.length === 0) {
29+
return (
30+
<section className="py-16 text-center">
31+
<h3 className="text-xl font-bold text-blue-500">내가 참여한 약속이 아직 없어요</h3>
32+
<p className="mt-4 text-gray-600">크루에서 약속에 참여해 보세요 🙌</p>
33+
</section>
34+
);
35+
}
36+
2837
return (
2938
<div>
3039
<div className="py-4 md:py-6">

src/app/not-found.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default function NotFound() {
3535
xmlnsXlink="http://www.w3.org/1999/xlink"
3636
viewBox="0 24 150 28"
3737
preserveAspectRatio="none"
38-
shape-rendering="auto"
38+
shapeRendering="auto"
3939
>
4040
<defs>
4141
<path

src/components/common/header/header.stories.tsx

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ const meta: Meta = {
77
component: Header,
88
tags: ['autodocs'],
99
parameters: {
10-
nextjs: {
11-
appDirectory: true,
10+
docs: {
11+
subtitle: '화면 최상단에 위치한 헤더',
12+
description: {
13+
component:
14+
"'로고, 크루찾기, 나의크루, 나의약속, 로그인/마이페이지/로그아웃'으로 구성되어 있으며 해당페이지로 연결됩니다.",
15+
},
1216
},
1317
},
1418
};
@@ -33,7 +37,7 @@ Home.parameters = {
3337
},
3438
docs: {
3539
description: {
36-
story: '사용자가 로그아웃 상태이며 기본 경로(/)에 있는 경우',
40+
story: '사용자가 기본 경로(/)에 있는 경우',
3741
},
3842
},
3943
};
@@ -49,7 +53,7 @@ MyCrew.parameters = {
4953
},
5054
docs: {
5155
description: {
52-
story: '사용자가 로그인 상태일 때 "나의 크루" 경로로 이동(+테스트용 버튼 클릭)',
56+
story: '사용자가 "나의 크루" 경로에 있는 경우',
5357
},
5458
},
5559
};
@@ -65,7 +69,23 @@ MyGathering.parameters = {
6569
},
6670
docs: {
6771
description: {
68-
story: '사용자가 로그인 상태일 때 "나의 모임" 경로로 이동(+테스트용 버튼 클릭)',
72+
story: '사용자가 "나의 약속" 경로에 있는 경우',
73+
},
74+
},
75+
};
76+
77+
// 3. 로그인 상태에서 나의 모임 (/my-favorite) 경로
78+
export const MyFavorite: StoryFn = Template.bind({});
79+
MyFavorite.parameters = {
80+
nextjs: {
81+
navigation: {
82+
pathname: '/my-favorite',
83+
query: {},
84+
},
85+
},
86+
docs: {
87+
description: {
88+
story: '사용자가 "찜한 약속" 경로에 있는 경우',
6989
},
7090
},
7191
};

src/components/common/input/password-input/password-input.stories.tsx

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ import PasswordInput, { PasswordInputProps } from '.';
55
const meta: Meta = {
66
title: 'common/input/password-input',
77
component: PasswordInput,
8+
tags: ['autodocs'],
9+
parameters: {
10+
docs: {
11+
subtitle: '비밀번호를 입력하는 input 컴포넌트',
12+
description: {
13+
component: 'placeholder, error 설정이 가능한 password-input 컴포넌트입니다.',
14+
},
15+
},
16+
},
817
};
918

1019
export default meta;
@@ -17,15 +26,17 @@ const Template: StoryFn<PasswordInputProps> = function PasswordInputStory(
1726

1827
export const Default = Template.bind({});
1928
Default.args = {
20-
label: 'Password',
21-
placeholder: 'Enter your password',
29+
label: '비밀번호',
30+
placeholder: '비밀번호를 입력해주세요',
2231
type: 'password',
32+
inputClassNames: 'bg-gray-100',
2333
};
2434

2535
export const WithError = Template.bind({});
2636
WithError.args = {
27-
label: 'Password',
28-
placeholder: 'Enter your password',
29-
error: 'Password is too short',
37+
label: '비밀번호',
38+
placeholder: '비밀번호를 입력해주세요',
39+
error: '비밀번호가 8자 이상이 되도록 해주세요.',
3040
type: 'password',
41+
inputClassNames: 'bg-gray-100',
3142
};

src/components/common/input/text-input/text-input.stories.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ import TextInput, { TextInputProps } from '.';
55
const meta: Meta = {
66
title: 'common/input/text-input',
77
component: TextInput,
8+
tags: ['autodocs'],
9+
parameters: {
10+
docs: {
11+
subtitle: '텍스트를 입력하는 input 컴포넌트',
12+
description: {
13+
component: 'label, placeholder, error 설정이 가능한 text-input 컴포넌트입니다.',
14+
},
15+
},
16+
},
817
};
918

1019
export default meta;
@@ -29,7 +38,7 @@ WithLabel.args = {
2938

3039
export const WithError = Template.bind({});
3140
WithError.args = {
32-
error: 'Invalid email format',
41+
error: '에러가 발생했습니다',
3342
type: 'text',
3443
inputClassNames: 'bg-gray-100',
3544
};

0 commit comments

Comments
 (0)