From 240c570b2eee903317ca2b40fe866f0a8a3751c0 Mon Sep 17 00:00:00 2001 From: jungjunhyung99 <55770796+jungjunhyung99@users.noreply.github.com> Date: Sat, 14 Jun 2025 16:59:00 +0900 Subject: [PATCH 1/4] =?UTF-8?q?[chore]=20vecel=20=EB=B0=B0=ED=8F=AC?= =?UTF-8?q?=EB=A5=BC=20=EC=9C=84=ED=95=9C=20script=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..2b5f119 --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cd ../ +mkdir output +cp -R ./Wedvice_FE/* ./output +cp -R ./output ./Wedvice_FE/ \ No newline at end of file From adbeede15fadda18b900c9d4ae39f85fd05b44d0 Mon Sep 17 00:00:00 2001 From: jungjunhyung99 <55770796+jungjunhyung99@users.noreply.github.com> Date: Sat, 14 Jun 2025 17:20:33 +0900 Subject: [PATCH 2/4] Create git-push.yml --- .github/workflows/git-push.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/git-push.yml diff --git a/.github/workflows/git-push.yml b/.github/workflows/git-push.yml new file mode 100644 index 0000000..68a48e7 --- /dev/null +++ b/.github/workflows/git-push.yml @@ -0,0 +1,30 @@ +name: git push into another repo to deploy to vercel + +on: + push: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + container: pandoc/latex + steps: + - uses: actions/checkout@v2 + - name: Install mustache (to update the date) + run: apk add ruby && gem install mustache + - name: creates output + run: sh ./build.sh + - name: Pushes to another repository + id: push_directory + uses: cpina/github-action-push-to-another-repository@main + env: + API_TOKEN_GITHUB: ${{ secrets.VECEL_TOKEN }} + with: + source-directory: 'output' + destination-github-username: jungjunhyung99 + destination-repository-name: Wedvice_FE + user-email: ${{ secrets.GITHUB_EMAIL }} + commit-message: ${{ github.event.commits[0].message }} + target-branch: main + - name: Test get variable exported by push-to-another-repository + run: echo $DESTINATION_CLONED_DIRECTORY From 2247b6eb6a18ebbc8f95b97165d1c424618f5117 Mon Sep 17 00:00:00 2001 From: suji8073 Date: Sat, 7 Jun 2025 12:33:16 +0900 Subject: [PATCH 3/4] =?UTF-8?q?[feat]=20ListTab=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=20=EA=B5=AC=ED=98=84=20-=20Tab=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=EC=9D=98=20TabInfo=20=EC=A0=9C?= =?UTF-8?q?=EB=84=88=EB=A6=AD=20=ED=83=80=EC=9E=85=20=EA=B8=B0=EB=B0=98?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=ED=83=80=EC=9E=85=20=EC=A0=95=EC=9D=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/molecules/listTab/ListTab.tsx | 51 ++++++++++++++++++++ src/components/molecules/listTab/index.ts | 1 + 2 files changed, 52 insertions(+) create mode 100644 src/components/molecules/listTab/ListTab.tsx create mode 100644 src/components/molecules/listTab/index.ts diff --git a/src/components/molecules/listTab/ListTab.tsx b/src/components/molecules/listTab/ListTab.tsx new file mode 100644 index 0000000..014f100 --- /dev/null +++ b/src/components/molecules/listTab/ListTab.tsx @@ -0,0 +1,51 @@ +'use client'; + +import { Dispatch, forwardRef, SetStateAction } from 'react'; +import { TabInfo } from '../tab/Tab'; + +export interface ListTabProps { + tabInfo: TabInfo; + selectedTab: T; + className?: string; + onClick: Dispatch>; +} + +const ListTabComponent = ( + { className, tabInfo, selectedTab, onClick, ...props }: ListTabProps, + ref: React.Ref, +) => { + return ( +
+ {tabInfo.map(({ tabType, label, count }) => { + const isSelected = selectedTab === tabType; + + return ( + + ); + })} +
+ ); +}; + +export const ListTab = forwardRef(ListTabComponent) as ( + props: ListTabProps & { ref?: React.Ref }, +) => JSX.Element; diff --git a/src/components/molecules/listTab/index.ts b/src/components/molecules/listTab/index.ts new file mode 100644 index 0000000..f5f70f9 --- /dev/null +++ b/src/components/molecules/listTab/index.ts @@ -0,0 +1 @@ +export { ListTab } from './ListTab'; From 22ddf40e5cad155212053cc4d5c8e941255c7363 Mon Sep 17 00:00:00 2001 From: suji8073 Date: Sat, 7 Jun 2025 12:36:39 +0900 Subject: [PATCH 4/4] =?UTF-8?q?[feat]=20ListTab=20=EC=8A=A4=ED=86=A0?= =?UTF-8?q?=EB=A6=AC=EB=B6=81=20=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../molecules/listTab/ListTab.stories.tsx | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/components/molecules/listTab/ListTab.stories.tsx diff --git a/src/components/molecules/listTab/ListTab.stories.tsx b/src/components/molecules/listTab/ListTab.stories.tsx new file mode 100644 index 0000000..ba8b6c5 --- /dev/null +++ b/src/components/molecules/listTab/ListTab.stories.tsx @@ -0,0 +1,61 @@ +'use client'; + +import type { Meta, StoryObj } from '@storybook/react'; +import { useState } from 'react'; +import { ListTab, ListTabProps } from './ListTab'; +import { TabInfo } from '../tab/Tab'; + +// ListTab 타입 정의 +type ListTabType = 'all' | 'inProgress' | 'completed'; + +const defaultListTabInfo: TabInfo = [ + { tabType: 'all', label: '전체', count: 7 }, + { tabType: 'inProgress', label: '진행 중', count: 5 }, + { tabType: 'completed', label: '진행 완료' }, +]; + +const meta: Meta = { + title: 'components/ListTab', + component: ListTab, + argTypes: { + selectedTab: { control: 'text' }, + onClick: { action: 'clicked' }, + }, +}; +export default meta; + +type Story = StoryObj>; + +// 기본 ListTab UI +export const Default: Story = { + render: (args) => { + const [selectedTab, setSelectedTab] = useState('all'); + + return ( + + ); + }, + args: { + tabInfo: defaultListTabInfo, + }, +}; + +// count가 있는 ListTab +export const WithCounts: Story = { + render: (args) => { + const [selectedTab, setSelectedTab] = useState('all'); + + return ( + + ); + }, +};