From f519ac18d105ab6502505d9f8399cf6209953cd2 Mon Sep 17 00:00:00 2001 From: steven-yn Date: Mon, 18 Dec 2023 16:43:27 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20Sections=20=EB=94=94=EB=A0=89?= =?UTF-8?q?=ED=84=B0=EB=A6=AC=20=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/page.tsx | 2 +- src/components/{ => Sections}/Keyword/Keyword.css.ts | 0 .../{ => Sections}/Keyword/Keyword.test.tsx | 0 src/components/{ => Sections}/Keyword/Keyword.tsx | 0 .../LinkProfileList/client/LinkProfileList.tsx | 0 .../LinkProfileList/helper/userDataSort.ts | 0 .../LinkProfileList/server/LinkProfileList.context.ts | 0 .../LinkProfileList/server/LinkProfileList.tsx | 4 ++-- .../server/helper/getImageByIdQuery.ts | 0 .../server/helper/getSNSByUserIdQuery.ts | 0 .../LinkProfileList/server/helper/getUsersQuery.ts | 0 src/stories/Components/LinkProfile.stories.tsx | 11 +++++++++++ .../Components/{ => Sections}/Keyword.stories.tsx | 4 ++-- .../Components/{ => Sections}/LinkProfileList.mdx | 2 +- 14 files changed, 17 insertions(+), 6 deletions(-) rename src/components/{ => Sections}/Keyword/Keyword.css.ts (100%) rename src/components/{ => Sections}/Keyword/Keyword.test.tsx (100%) rename src/components/{ => Sections}/Keyword/Keyword.tsx (100%) rename src/components/{ => Sections}/LinkProfileList/client/LinkProfileList.tsx (100%) rename src/components/{ => Sections}/LinkProfileList/helper/userDataSort.ts (100%) rename src/components/{ => Sections}/LinkProfileList/server/LinkProfileList.context.ts (100%) rename src/components/{ => Sections}/LinkProfileList/server/LinkProfileList.tsx (90%) rename src/components/{ => Sections}/LinkProfileList/server/helper/getImageByIdQuery.ts (100%) rename src/components/{ => Sections}/LinkProfileList/server/helper/getSNSByUserIdQuery.ts (100%) rename src/components/{ => Sections}/LinkProfileList/server/helper/getUsersQuery.ts (100%) rename src/stories/Components/{ => Sections}/Keyword.stories.tsx (95%) rename src/stories/Components/{ => Sections}/LinkProfileList.mdx (88%) diff --git a/src/app/page.tsx b/src/app/page.tsx index fc31754..3d68539 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,5 +1,5 @@ -import LinkProfileList from '@/components/LinkProfileList/server/LinkProfileList'; import Home from '@/components/Pages/Home/Home'; +import LinkProfileList from '@/components/Sections/LinkProfileList/server/LinkProfileList'; export default async function HomePage() { return ( diff --git a/src/components/Keyword/Keyword.css.ts b/src/components/Sections/Keyword/Keyword.css.ts similarity index 100% rename from src/components/Keyword/Keyword.css.ts rename to src/components/Sections/Keyword/Keyword.css.ts diff --git a/src/components/Keyword/Keyword.test.tsx b/src/components/Sections/Keyword/Keyword.test.tsx similarity index 100% rename from src/components/Keyword/Keyword.test.tsx rename to src/components/Sections/Keyword/Keyword.test.tsx diff --git a/src/components/Keyword/Keyword.tsx b/src/components/Sections/Keyword/Keyword.tsx similarity index 100% rename from src/components/Keyword/Keyword.tsx rename to src/components/Sections/Keyword/Keyword.tsx diff --git a/src/components/LinkProfileList/client/LinkProfileList.tsx b/src/components/Sections/LinkProfileList/client/LinkProfileList.tsx similarity index 100% rename from src/components/LinkProfileList/client/LinkProfileList.tsx rename to src/components/Sections/LinkProfileList/client/LinkProfileList.tsx diff --git a/src/components/LinkProfileList/helper/userDataSort.ts b/src/components/Sections/LinkProfileList/helper/userDataSort.ts similarity index 100% rename from src/components/LinkProfileList/helper/userDataSort.ts rename to src/components/Sections/LinkProfileList/helper/userDataSort.ts diff --git a/src/components/LinkProfileList/server/LinkProfileList.context.ts b/src/components/Sections/LinkProfileList/server/LinkProfileList.context.ts similarity index 100% rename from src/components/LinkProfileList/server/LinkProfileList.context.ts rename to src/components/Sections/LinkProfileList/server/LinkProfileList.context.ts diff --git a/src/components/LinkProfileList/server/LinkProfileList.tsx b/src/components/Sections/LinkProfileList/server/LinkProfileList.tsx similarity index 90% rename from src/components/LinkProfileList/server/LinkProfileList.tsx rename to src/components/Sections/LinkProfileList/server/LinkProfileList.tsx index c64a3de..4b458ac 100644 --- a/src/components/LinkProfileList/server/LinkProfileList.tsx +++ b/src/components/Sections/LinkProfileList/server/LinkProfileList.tsx @@ -1,8 +1,8 @@ import React, { PropsWithChildren } from 'react'; import { getClient } from '@/apollo/apollo-client'; import LinkProfile from '@/components/LinkProfile/LinkProfile'; -import { getImageByIdQuery } from '@/components/LinkProfileList/server/helper/getImageByIdQuery'; -import { getSNSByUserIdQuery } from '@/components/LinkProfileList/server/helper/getSNSByUserIdQuery'; +import { getImageByIdQuery } from '@/components/Sections/LinkProfileList/server/helper/getImageByIdQuery'; +import { getSNSByUserIdQuery } from '@/components/Sections/LinkProfileList/server/helper/getSNSByUserIdQuery'; import { getProfileSocialData } from '@/helper/getProfileSocialData'; import { getStaticContext } from '@/utils/context/StaticContext'; import { userDataSort } from '../helper/userDataSort'; diff --git a/src/components/LinkProfileList/server/helper/getImageByIdQuery.ts b/src/components/Sections/LinkProfileList/server/helper/getImageByIdQuery.ts similarity index 100% rename from src/components/LinkProfileList/server/helper/getImageByIdQuery.ts rename to src/components/Sections/LinkProfileList/server/helper/getImageByIdQuery.ts diff --git a/src/components/LinkProfileList/server/helper/getSNSByUserIdQuery.ts b/src/components/Sections/LinkProfileList/server/helper/getSNSByUserIdQuery.ts similarity index 100% rename from src/components/LinkProfileList/server/helper/getSNSByUserIdQuery.ts rename to src/components/Sections/LinkProfileList/server/helper/getSNSByUserIdQuery.ts diff --git a/src/components/LinkProfileList/server/helper/getUsersQuery.ts b/src/components/Sections/LinkProfileList/server/helper/getUsersQuery.ts similarity index 100% rename from src/components/LinkProfileList/server/helper/getUsersQuery.ts rename to src/components/Sections/LinkProfileList/server/helper/getUsersQuery.ts diff --git a/src/stories/Components/LinkProfile.stories.tsx b/src/stories/Components/LinkProfile.stories.tsx index d59994c..0183c55 100644 --- a/src/stories/Components/LinkProfile.stories.tsx +++ b/src/stories/Components/LinkProfile.stories.tsx @@ -6,6 +6,17 @@ const meta: Meta = { component: LinkProfile, tags: ['autodocs'], parameters: { layout: 'fullscreen' }, + decorators: [ + (Story) => ( +
+ +
+ ), + ], }; type Story = StoryObj; diff --git a/src/stories/Components/Keyword.stories.tsx b/src/stories/Components/Sections/Keyword.stories.tsx similarity index 95% rename from src/stories/Components/Keyword.stories.tsx rename to src/stories/Components/Sections/Keyword.stories.tsx index 0d5ad8e..3513763 100644 --- a/src/stories/Components/Keyword.stories.tsx +++ b/src/stories/Components/Sections/Keyword.stories.tsx @@ -1,9 +1,9 @@ import { Meta, StoryObj } from '@storybook/react'; -import Keyword from '@/components/Keyword/Keyword'; +import Keyword from '@/components/Sections/Keyword/Keyword'; import { backgroundColorVariants } from '@/styles/common/color.css'; const meta: Meta = { - title: 'Components/Keyword', + title: 'Components/Sections/Keyword', component: Keyword, tags: ['autodocs'], parameters: { layout: 'fullscreen' }, diff --git a/src/stories/Components/LinkProfileList.mdx b/src/stories/Components/Sections/LinkProfileList.mdx similarity index 88% rename from src/stories/Components/LinkProfileList.mdx rename to src/stories/Components/Sections/LinkProfileList.mdx index 96f68ae..905a429 100644 --- a/src/stories/Components/LinkProfileList.mdx +++ b/src/stories/Components/Sections/LinkProfileList.mdx @@ -3,7 +3,7 @@ import { ApolloWrapper } from '@/apollo/apollo-wrapper'; import LinkProfileList from '@/components/LinkProfileList/client/LinkProfileList'; import Home from '@/components/Pages/Home/Home'; - + # LinkProfileList