Skip to content
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
10 changes: 10 additions & 0 deletions src/app/(auth)/login/_components/login-form.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ import LoginForm, { LoginFormValues } from './login-form';
const meta: Meta = {
title: 'auth/login-form',
component: LoginForm,
tags: ['autodocs'],
parameters: {
docs: {
subtitle: '로그인시 사용되는 폼',
description: {
component:
'포커스 이동 또는 입력 1초 이후에 이메일 형식, 비밀번호 8자이상 유효성 검사가 실행됩니다.',
},
},
},
};

export default meta;
Expand Down
10 changes: 10 additions & 0 deletions src/app/(auth)/signup/_components/signup-form.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ import SignupForm, { SignupFormValues } from './signup-form';
const meta: Meta = {
title: 'auth/signup-form',
component: SignupForm,
tags: ['autodocs'],
parameters: {
docs: {
subtitle: '회원가입시 사용되는 폼',
description: {
component:
'포커스 이동 또는 입력 1초 이후에 이메일 형식, 비밀번호 8자이상, 비밀번호 확인 유효성 검사가 실행됩니다.',
},
},
},
};

export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,24 @@ const meta: Meta = {
title: 'layout/category',
component: InternalCategory,
tags: ['autodocs'],
parameters: {
docs: {
subtitle: '운동 종목별 카테고리',
description: {
component: '크루찾기 페이지에서 운동 대종목 선택에 따라, 세부 카테고리를 보여줍니다.',
},
},
},
argTypes: {
category: {
description: '세부 카테고리 이름 배열',
description: '카테고리 이름 배열',
},
},
};

export default meta;

const Template: StoryFn<InternalCategoryProps> = function InternalCategoryStory() {
const Template: StoryFn = function InternalCategoryStory() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

타입 시그니처 변경에 대한 검토가 필요합니다.

StoryFn<InternalCategoryProps>에서 StoryFn으로 변경되었는데, 이는 타입 안정성을 낮출 수 있습니다.

다음과 같이 수정하는 것을 제안드립니다:

-const Template: StoryFn = function InternalCategoryStory() {
+const Template: StoryFn<InternalCategoryProps> = function InternalCategoryStory() {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const Template: StoryFn = function InternalCategoryStory() {
const Template: StoryFn<InternalCategoryProps> = function InternalCategoryStory() {

const [subCategory, setSubCategory] = useState('running');

return (
Expand All @@ -28,12 +36,5 @@ const Template: StoryFn<InternalCategoryProps> = function InternalCategoryStory(
);
};

export const Category1 = Template.bind({});
Category1.args = {
category: categoryData[0].items,
};

export const Category2 = Template.bind({});
Category2.args = {
category: categoryData[1].items,
};
export const Default = Template.bind({});
Default.args = {};
Binary file removed src/app/(crew)/favicon.ico
Binary file not shown.
9 changes: 9 additions & 0 deletions src/app/(crew)/my-gathering/hosted/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ export default function MyGatheringHostedPage() {
refetch();
}, [selectedDate]);

if (hostedGatheringList?.length === 0) {
return (
<section className="py-16 text-center">
<h3 className="text-xl font-bold text-blue-500">내가 만든 약속이 아직 없어요</h3>
<p className="mt-4 text-gray-600">크루에서 약속을 만들어보세요 🙌</p>
</section>
);
}

return (
<div>
<div className="py-4 md:py-6">
Expand Down
9 changes: 9 additions & 0 deletions src/app/(crew)/my-gathering/joined/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ export default function MyGatheringJoinedPage() {
refetch();
}, [selectedDate]);

if (joinedGatheringList?.length === 0) {
return (
<section className="py-16 text-center">
<h3 className="text-xl font-bold text-blue-500">내가 참여한 약속이 아직 없어요</h3>
<p className="mt-4 text-gray-600">크루에서 약속에 참여해 보세요 🙌</p>
</section>
);
}

return (
<div>
<div className="py-4 md:py-6">
Expand Down
2 changes: 1 addition & 1 deletion src/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function NotFound() {
xmlnsXlink="http://www.w3.org/1999/xlink"
viewBox="0 24 150 28"
preserveAspectRatio="none"
shape-rendering="auto"
shapeRendering="auto"
>
<defs>
<path
Expand Down
30 changes: 25 additions & 5 deletions src/components/common/header/header.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ const meta: Meta = {
component: Header,
tags: ['autodocs'],
parameters: {
nextjs: {
appDirectory: true,
docs: {
subtitle: '화면 최상단에 위치한 헤더',
description: {
component:
"'로고, 크루찾기, 나의크루, 나의약속, 로그인/마이페이지/로그아웃'으로 구성되어 있으며 해당페이지로 연결됩니다.",
},
},
},
};
Expand All @@ -33,7 +37,7 @@ Home.parameters = {
},
docs: {
description: {
story: '사용자가 로그아웃 상태이며 기본 경로(/)에 있는 경우',
story: '사용자가 기본 경로(/)에 있는 경우',
},
},
};
Expand All @@ -49,7 +53,7 @@ MyCrew.parameters = {
},
docs: {
description: {
story: '사용자가 로그인 상태일 때 "나의 크루" 경로로 이동(+테스트용 버튼 클릭)',
story: '사용자가 "나의 크루" 경로에 있는 경우',
},
},
};
Expand All @@ -65,7 +69,23 @@ MyGathering.parameters = {
},
docs: {
description: {
story: '사용자가 로그인 상태일 때 "나의 모임" 경로로 이동(+테스트용 버튼 클릭)',
story: '사용자가 "나의 약속" 경로에 있는 경우',
},
},
};

// 3. 로그인 상태에서 나의 모임 (/my-favorite) 경로
export const MyFavorite: StoryFn = Template.bind({});
MyFavorite.parameters = {
nextjs: {
navigation: {
pathname: '/my-favorite',
query: {},
},
},
docs: {
description: {
story: '사용자가 "찜한 약속" 경로에 있는 경우',
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ import PasswordInput, { PasswordInputProps } from '.';
const meta: Meta = {
title: 'common/input/password-input',
component: PasswordInput,
tags: ['autodocs'],
parameters: {
docs: {
subtitle: '비밀번호를 입력하는 input 컴포넌트',
description: {
component: 'placeholder, error 설정이 가능한 password-input 컴포넌트입니다.',
},
},
},
};

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

export const Default = Template.bind({});
Default.args = {
label: 'Password',
placeholder: 'Enter your password',
label: '비밀번호',
placeholder: '비밀번호를 입력해주세요',
type: 'password',
inputClassNames: 'bg-gray-100',
};

export const WithError = Template.bind({});
WithError.args = {
label: 'Password',
placeholder: 'Enter your password',
error: 'Password is too short',
label: '비밀번호',
placeholder: '비밀번호를 입력해주세요',
error: '비밀번호가 8자 이상이 되도록 해주세요.',
type: 'password',
inputClassNames: 'bg-gray-100',
};
11 changes: 10 additions & 1 deletion src/components/common/input/text-input/text-input.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ import TextInput, { TextInputProps } from '.';
const meta: Meta = {
title: 'common/input/text-input',
component: TextInput,
tags: ['autodocs'],
parameters: {
docs: {
subtitle: '텍스트를 입력하는 input 컴포넌트',
description: {
component: 'label, placeholder, error 설정이 가능한 text-input 컴포넌트입니다.',
},
},
},
};

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

export const WithError = Template.bind({});
WithError.args = {
error: 'Invalid email format',
error: '에러가 발생했습니다',
type: 'text',
inputClassNames: 'bg-gray-100',
};
9 changes: 9 additions & 0 deletions src/components/common/input/textarea/textarea.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ import Textarea, { TextareaProps } from '.';
const meta: Meta = {
title: 'common/input/textarea',
component: Textarea,
tags: ['autodocs'],
parameters: {
docs: {
subtitle: '텍스트를 입력하는 textarea 컴포넌트',
description: {
component: 'label, placeholder, error 설정이 가능한 텍스트 textarea 컴포넌트입니다.',
},
},
},
};

export default meta;
Expand Down
47 changes: 41 additions & 6 deletions src/components/common/tab/tab.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ const meta: Meta = {
title: 'layout/tabs',
component: Tabs,
tags: ['autodocs'],
parameters: {
docs: {
subtitle: '화면 최상단에 위치한 헤더',
description: {
component:
"'로고, 크루찾기, 나의크루, 나의약속, 로그인/마이페이지/로그아웃'으로 구성되어 있으며 해당페이지로 연결됩니다.",
},
},
},
Comment on lines +11 to +19
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

컴포넌트 설명이 부적절합니다

현재 문서에서는 이 컴포넌트를 헤더로 설명하고 있으나, 실제로는 탭 컴포넌트입니다. 컴포넌트의 실제 기능과 일치하도록 설명을 수정해주세요.

다음과 같이 수정하는 것을 제안합니다:

  parameters: {
    docs: {
-     subtitle: '화면 최상단에 위치한 헤더',
+     subtitle: '페이지 내 콘텐츠를 구분하는 탭',
      description: {
        component:
-         "'로고, 크루찾기, 나의크루, 나의약속, 로그인/마이페이지/로그아웃'으로 구성되어 있으며 해당페이지로 연결됩니다.",
+         "페이지 내에서 관련 콘텐츠를 구분하여 표시하는 탭 컴포넌트입니다. 사용자가 탭을 클릭하면 해당 콘텐츠로 전환됩니다.",
      },
    },
  },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
parameters: {
docs: {
subtitle: '화면 최상단에 위치한 헤더',
description: {
component:
"'로고, 크루찾기, 나의크루, 나의약속, 로그인/마이페이지/로그아웃'으로 구성되어 있으며 해당페이지로 연결됩니다.",
},
},
},
parameters: {
docs: {
subtitle: '페이지 내 콘텐츠를 구분하는 탭',
description: {
component:
"페이지 내에서 관련 콘텐츠를 구분하여 표시하는 탭 컴포넌트입니다. 사용자가 탭을 클릭하면 해당 콘텐츠로 전환됩니다.",
},
},
},

argTypes: {
tabs: {
description: '탭 목록 데이터 배열',
Expand Down Expand Up @@ -40,15 +49,41 @@ const Template: StoryFn<TabsProps> = function TabsStory({ activeTab, tabs, ...ar
/>
);
};
export const MyCrewTabs = Template.bind({});
MyCrewTabs.args = {
tabs: tabData.crewTabs,
activeTab: tabData.crewTabs[0].id,
};
MyCrewTabs.parameters = {
docs: {
description: {
story: "'나의 크루' 페이지에서 사용되는 탭",
},
},
};

export const AppointmentTabs = Template.bind({});
AppointmentTabs.args = {
export const MyGatheringTabs = Template.bind({});
MyGatheringTabs.args = {
tabs: tabData.appointmentTabs,
activeTab: tabData.appointmentTabs[0].id,
};
MyGatheringTabs.parameters = {
docs: {
description: {
story: "'나의 약속' 페이지에서 사용되는 탭",
},
},
};

export const CrewTabs = Template.bind({});
CrewTabs.args = {
tabs: tabData.crewTabs,
activeTab: tabData.crewTabs[0].id,
export const ReviewTabs = Template.bind({});
ReviewTabs.args = {
tabs: tabData.reviewTabs,
activeTab: tabData.reviewTabs[0].id,
};
ReviewTabs.parameters = {
docs: {
description: {
story: "'마이페이지' 페이지의 리뷰에서 사용되는 탭",
},
},
};
Loading