From 950dfee3b31696b9c168cceee13c39430ce2eb28 Mon Sep 17 00:00:00 2001 From: halfmoon-mind <5338095@gmail.com> Date: Mon, 11 Dec 2023 00:12:53 +0900 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20PR=20=EC=98=AC=EB=A6=B4=20=EB=95=8C?= =?UTF-8?q?,=20Github=20Action=EC=97=90=EC=84=9C=20build=20=ED=8A=B8?= =?UTF-8?q?=EB=A6=AC=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pull_request_action.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/pull_request_action.yml diff --git a/.github/workflows/pull_request_action.yml b/.github/workflows/pull_request_action.yml new file mode 100644 index 00000000..c124b61b --- /dev/null +++ b/.github/workflows/pull_request_action.yml @@ -0,0 +1,23 @@ +name: Build on PR + +on: + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: '14' + + - name: Install dependencies + run: yarn install + + - name: Build + run: yarn build From ae821f298148df5d9fecb55ce4d289ee44685f7c Mon Sep 17 00:00:00 2001 From: halfmoon-mind <5338095@gmail.com> Date: Mon, 11 Dec 2023 00:13:13 +0900 Subject: [PATCH 2/6] =?UTF-8?q?fix:=20=EB=B9=8C=EB=93=9C=EA=B0=80=20?= =?UTF-8?q?=EC=95=88=EB=90=98=EB=8A=94=20=EB=B6=80=EB=B6=84=20=EC=97=85?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EditEventModal/EditEventModal.tsx | 2 +- .../NoticeFunSystem.stories.tsx | 47 +++++--- .../ImageInputBox/IconBox/IconBox.tsx | 46 ++++++-- .../ImageInputBox/ImageInputBox.tsx | 45 ++++---- .../community/list/CommunityList.tsx | 108 ++++++++++-------- src/components/notice/NoticeItem.stories.tsx | 6 +- src/components/notice/NoticeList.stories.tsx | 50 ++++---- .../notice/anouncement/Anouncement.tsx | 13 ++- src/pages/my/agree/index.page.tsx | 2 +- src/pages/my/agree/info/index.page.tsx | 2 +- src/pages/my/blockAccount/index.page.tsx | 4 +- src/pages/my/post/index.page.tsx | 2 +- src/pages/my/setting/index.page.tsx | 2 +- src/pages/my/withdrawal/index.page.tsx | 3 +- src/types/course.ts | 2 +- 15 files changed, 193 insertions(+), 141 deletions(-) diff --git a/src/components/Calendar/EditEventModal/EditEventModal.tsx b/src/components/Calendar/EditEventModal/EditEventModal.tsx index 634f3648..8dc91c78 100644 --- a/src/components/Calendar/EditEventModal/EditEventModal.tsx +++ b/src/components/Calendar/EditEventModal/EditEventModal.tsx @@ -7,11 +7,11 @@ import { ko } from 'date-fns/locale'; import calendar from '@icons/icon/Calendars/calendar.svg'; import Image from 'next/image'; import { - Course, getCourseAPI, postCourseAssignmentAPI, postCourseVideoAPI, } from '@/apis/courseAPIS'; +import { Course } from '@/types/course'; interface EditEventModalProps { event?: EventProps; diff --git a/src/components/Home/NoticeFunSystem/NoticeFunSystem.stories.tsx b/src/components/Home/NoticeFunSystem/NoticeFunSystem.stories.tsx index bbf1719a..a9d9c7c2 100644 --- a/src/components/Home/NoticeFunSystem/NoticeFunSystem.stories.tsx +++ b/src/components/Home/NoticeFunSystem/NoticeFunSystem.stories.tsx @@ -1,30 +1,39 @@ import React from 'react'; import { Story } from '@storybook/react'; -import NoticeFunSystem, {NoticeFunSystemProps} from './NoticeFunSystem'; +import NoticeFunSystem, { NoticeFunSystemProps } from './NoticeFunSystem'; export default { title: 'Home/NoticeFunSystem', component: NoticeFunSystem, }; -const summaries = [ - { - textContent: '2023-1학기(여름계절제수업 포함) 성적처리~~~~~~~~~~~~~~~~~~~~~~~', - date: '5/11', - }, - { - textContent: '두 번째 공지 내용', - date: '5/12', - }, - { - textContent: '세 번째 공지 내용', - date: '5/13', - }, -]; - -const Template: Story = (args) => ; +const Template: Story = (args) => ( + +); export const Default = Template.bind({}); Default.args = { title: '공지사항 혹은 펀시스템', - summaries: summaries, -}; \ No newline at end of file + summaries: [ + { + id: 1, + title: '2023-1학기(여름계절제수업 포함) 성적처리~~~~~~~~~~~~~~~~~~~~~~~', + category: 'Notice', + createdAt: '5/11', + views: 10, + }, + { + id: 2, + title: '두 번째 공지 내용', + category: 'Notice', + createdAt: '5/12', + views: 5, + }, + { + id: 3, + title: '세 번째 공지 내용', + category: 'Notice', + createdAt: '5/13', + views: 8, + }, + ], +}; diff --git a/src/components/community/community_writing/ImageInputBox/IconBox/IconBox.tsx b/src/components/community/community_writing/ImageInputBox/IconBox/IconBox.tsx index 7b7973bc..c6a56607 100644 --- a/src/components/community/community_writing/ImageInputBox/IconBox/IconBox.tsx +++ b/src/components/community/community_writing/ImageInputBox/IconBox/IconBox.tsx @@ -1,23 +1,45 @@ import React from 'react'; import { COLORS } from '@/styles/constants/colors'; -import * as styles from "@/components/community/community_writing/ImageInputBox/IconBox/IconBox.styles" +import * as styles from '@/components/community/community_writing/ImageInputBox/IconBox/IconBox.styles'; +import Image from 'next/image'; interface FormData { - iconSize?:number; - width?:number; - height?:number; - backCol?:string; - margin?:number; - IconCol?:string; + iconSize?: number; + width?: number; + height?: number; + backgroundColor?: string; + margin?: number; + IconColor?: string; } -const IconBox = ({iconSize,width,height,backCol,margin,IconCol }:FormData) => { +const IconBox = ({ + iconSize, + width, + height, + backgroundColor, + margin, + IconColor, +}: FormData) => { return ( <> diff --git a/src/components/community/community_writing/ImageInputBox/ImageInputBox.tsx b/src/components/community/community_writing/ImageInputBox/ImageInputBox.tsx index 0347375d..749a8695 100644 --- a/src/components/community/community_writing/ImageInputBox/ImageInputBox.tsx +++ b/src/components/community/community_writing/ImageInputBox/ImageInputBox.tsx @@ -1,37 +1,36 @@ import React from 'react'; -import { FiCamera } from 'react-icons/fi'; // react-icons에서 FiCamera 아이콘 불러오기 import ImageBox from './ImageBox/ImageBox'; import IconBox from './IconBox/IconBox'; import TitleBox from './TitleBox/TitleBox'; interface FormData { previewImage: string[]; // 이미지 미리보기를 위한 string 배열 - handleImageChange:(event: React.ChangeEvent) => void; // onChange 타입 변경 + handleImageChange: (event: React.ChangeEvent) => void; // onChange 타입 변경 } -const ImageInputBox = ({previewImage,handleImageChange }:FormData) => { +const ImageInputBox = ({ previewImage, handleImageChange }: FormData) => { return ( <> - -
- {previewImage.length === 0 ? null : ( - <> - {previewImage.map((image, index) => ( - - ))} - - )} - - -
+ +
+ {previewImage.length === 0 ? null : ( + <> + {previewImage.map((image, index) => ( + + ))} + + )} + + +
); }; diff --git a/src/components/community/list/CommunityList.tsx b/src/components/community/list/CommunityList.tsx index 3605734b..a70e7bf9 100644 --- a/src/components/community/list/CommunityList.tsx +++ b/src/components/community/list/CommunityList.tsx @@ -1,25 +1,26 @@ - import * as styles from './CommunityList.style'; -import React, {FC, useState, useEffect} from 'react'; -import CommunityItem, {CommunityItemProps} from './CommunityListItem'; +import React, { FC, useState, useEffect } from 'react'; +import CommunityItem, { CommunityItemProps } from './CommunityListItem'; import { jsx, css } from '@emotion/react'; import Link from 'next/link'; import { getCommunityItemAPI } from '@/apis/communityAPIS'; import { COLORS } from '@/styles/constants/colors'; import plus_img from '@icons/icon/Button/plus_button.svg'; -const CommunityList :FC<{ isButtonVisible: boolean; search: string }> = ({ isButtonVisible, search })=>{ - +const CommunityList: FC<{ isButtonVisible: boolean; search: string }> = ({ + isButtonVisible, + search, +}) => { const [page, setPage] = useState(0); - const [category, setCategory] = useState("ALL"); - const [items,setItems] = useState([]); + const [category, setCategory] = useState('ALL'); + const [items, setItems] = useState([]); const [fetching, setFetching] = useState(false); - const [index,setIndex] = useState(0); + const [index, setIndex] = useState(0); - const fetchData = async() =>{ - try{ + const fetchData = async () => { + try { setFetching(true); - const data = await getCommunityItemAPI(search,category,page); + const data = await getCommunityItemAPI(search, category, page); if (data) { if (page === 0) { setItems(data.data.articles); @@ -30,9 +31,9 @@ const CommunityList :FC<{ isButtonVisible: boolean; search: string }> = ({ isBut } else { console.error('커뮤니티 데이터를 불러오는 중 오류 발생:', data.message); } - }catch(error){ + } catch (error) { console.error('커뮤니티 데이터를 불러오는 중 오류 발생:', error); - }finally{ + } finally { setFetching(false); } }; @@ -42,77 +43,84 @@ const CommunityList :FC<{ isButtonVisible: boolean; search: string }> = ({ isBut const scrollTop = document.documentElement.scrollTop; const clientHeight = document.documentElement.clientHeight; - if (scrollTop + clientHeight >= scrollHeight&& !fetching) { + if (scrollTop + clientHeight >= scrollHeight && !fetching) { fetchData(); } }; useEffect(() => { fetchData(); - window.addEventListener("scroll",handleScroll); - return()=>{ - window.removeEventListener("scroll", handleScroll); + window.addEventListener('scroll', handleScroll); + return () => { + window.removeEventListener('scroll', handleScroll); }; - - },[index,search]); + }, [index, search]); useEffect(() => { setPage(0); fetchData(); }, [search, category]); - const selectTagHandler = (n : number) =>{ + const selectTagHandler = (n: number) => { setCategory(tag[n].eng); setIndex(n); setPage(0); - - } + }; + + const plus_button_onClick = () => { + // 커뮤니티 게시글 추가 컴포넌트 연결 + }; - const plus_button_onClick = () =>{ - // 커뮤니티 게시글 추가 컴포넌트 연결 - } - const tag = [ - { kor: "전체", eng: "ALL" }, - { kor: "인기글", eng: "POPULAR" }, - { kor: "잡담", eng: "CHAT" }, - { kor: "질문", eng: "QUESTION" }, - { kor: "정보", eng: "INFORMATION" }, + { kor: '전체', eng: 'ALL' }, + { kor: '인기글', eng: 'POPULAR' }, + { kor: '잡담', eng: 'CHAT' }, + { kor: '질문', eng: 'QUESTION' }, + { kor: '정보', eng: 'INFORMATION' }, ]; - - return( + return ( <> - {isButtonVisible && + {isButtonVisible && ( - {tag.map(({kor,eng}, idx) =>( + {tag.map(({ kor, eng }, idx) => ( selectTagHandler(idx)}>{kor} + onClick={() => selectTagHandler(idx)} + > + {kor} + ))} - } + )} - - {items.map((item:CommunityItemProps,key:number)=> { - return ; + {items.map((item: CommunityItemProps, key: number) => { + return ; })} - + - - + ); }; - -export default CommunityList; \ No newline at end of file +export default CommunityList; diff --git a/src/components/notice/NoticeItem.stories.tsx b/src/components/notice/NoticeItem.stories.tsx index 390fca48..16c98034 100644 --- a/src/components/notice/NoticeItem.stories.tsx +++ b/src/components/notice/NoticeItem.stories.tsx @@ -1,6 +1,6 @@ -import type { Story } from '@storybook/react'; +import type { Story } from '@storybook/react'; import React from 'react'; -import NoticeItem, {NoticeItemProps} from './NoticeItem'; +import NoticeItem, { NoticeItemProps } from './NoticeItem'; export default { title: 'Notice-Funsystem/NoticeItem', @@ -16,4 +16,4 @@ Default.args = { title: 'Example Notice Title', views: 12345, date: '2023-08-09', -} as NoticeItemProps; \ No newline at end of file +} as unknown as NoticeItemProps; diff --git a/src/components/notice/NoticeList.stories.tsx b/src/components/notice/NoticeList.stories.tsx index e6b9f177..f8706c4e 100644 --- a/src/components/notice/NoticeList.stories.tsx +++ b/src/components/notice/NoticeList.stories.tsx @@ -1,4 +1,3 @@ - import React from 'react'; import { Story } from '@storybook/react'; import NoticeList from './NoticeList'; @@ -7,55 +6,64 @@ import { NoticeItemProps } from './NoticeItem'; export default { title: 'Notice-Funsystem/NoticeList', component: NoticeList, -} +}; -const Template: Story<{ items: NoticeItemProps[] }> = (args) => ; +const Template: Story<{ items: NoticeItemProps[] }> = (args) => ( + +); export const Default = Template.bind({}); -Default.args= { - items:[ +Default.args = { + items: [ { - bundle: '학사', + id: 1, + category: '학사', title: '2023-1학기 다전공(복수,부,융합전공) 신청', views: 1706, - date: '24/05/11', + createdAt: '24/05/11', }, { - bundle: '학습역량', + id: 2, title: '학습역량 아무말 신청합니다~~~~~~~~~!!!!!!!!!!!!!!!!!', views: 1123123, - date: '23/06/19', + category: '학사', + createdAt: '24/05/11', }, { - bundle: '학사', + id: 3, title: '2023-1학기 다전공(복수,부,융합전공) 신청', views: 1706, - date: '24/05/11', + category: '학사', + createdAt: '24/05/11', }, { - bundle: '학사', + id: 4, title: '2023-1학기 다전공(복수,부,융합전공) 신청', views: 1706, - date: '24/05/11', + category: '학사', + createdAt: '24/05/11', }, { - bundle: '학사', + id: 5, title: '2023-1학기 다전공(복수,부,융합전공) 신청', views: 1706, - date: '24/05/11', + category: '학사', + createdAt: '24/05/11', }, { - bundle: '학사', + id: 6, title: '2023-1학기 다전공(복수,부,융합전공) 신청', views: 1706, - date: '24/05/11', + category: '학사', + createdAt: '24/05/11', }, { - bundle: '학사', + id: 7, title: '2023-1학기 다전공(복수,부,융합전공) 신청', views: 1706, - date: '24/05/11', + category: '학사', + createdAt: '24/05/11', }, - ] -} \ No newline at end of file + ], +}; diff --git a/src/components/notice/anouncement/Anouncement.tsx b/src/components/notice/anouncement/Anouncement.tsx index 9e556fbb..6b21a7ca 100644 --- a/src/components/notice/anouncement/Anouncement.tsx +++ b/src/components/notice/anouncement/Anouncement.tsx @@ -6,10 +6,19 @@ const Anouncement = () => { return ( - + - + ); diff --git a/src/pages/my/agree/index.page.tsx b/src/pages/my/agree/index.page.tsx index 9526754e..39aa22af 100644 --- a/src/pages/my/agree/index.page.tsx +++ b/src/pages/my/agree/index.page.tsx @@ -1,6 +1,6 @@ import Head from 'next/head'; import { Inter } from 'next/font/google'; -import Agree from '@/components/mypage/agree/Agree'; +import Agree from '@/components/myPage/agree/Agree'; const inter = Inter({ subsets: ['latin'] }); diff --git a/src/pages/my/agree/info/index.page.tsx b/src/pages/my/agree/info/index.page.tsx index 0144a925..524e0df7 100644 --- a/src/pages/my/agree/info/index.page.tsx +++ b/src/pages/my/agree/info/index.page.tsx @@ -1,6 +1,6 @@ import Head from 'next/head'; import { Inter } from 'next/font/google'; -import AgreeInfo from '@/components/mypage/agree/info/AgreeInfo'; +import AgreeInfo from '@/components/myPage/agree/info/AgreeInfo'; const inter = Inter({ subsets: ['latin'] }); diff --git a/src/pages/my/blockAccount/index.page.tsx b/src/pages/my/blockAccount/index.page.tsx index 9a833c34..01576c77 100644 --- a/src/pages/my/blockAccount/index.page.tsx +++ b/src/pages/my/blockAccount/index.page.tsx @@ -1,7 +1,5 @@ import Header from '@/components/common/Header/Header'; -import NavigationBar from '@/components/common/Navbar/NavigationBar'; -import BlockAccount from '@/components/myPage/blockAccount/BlockAccount'; -import Setting from '@/components/myPage/setting/Setting'; +import BlockAccount from '@/components/myPage/blockAccount/blockAccount'; export default function Home() { return ( diff --git a/src/pages/my/post/index.page.tsx b/src/pages/my/post/index.page.tsx index 72aa0dcf..0e43167b 100644 --- a/src/pages/my/post/index.page.tsx +++ b/src/pages/my/post/index.page.tsx @@ -1,6 +1,6 @@ import Head from 'next/head'; import { Inter } from 'next/font/google'; -import MyPost from '@/components/mypage/Post/MyPost'; +import MyPost from '@/components/myPage/Post/MyPost'; const inter = Inter({ subsets: ['latin'] }); diff --git a/src/pages/my/setting/index.page.tsx b/src/pages/my/setting/index.page.tsx index 702facb7..924dbfec 100644 --- a/src/pages/my/setting/index.page.tsx +++ b/src/pages/my/setting/index.page.tsx @@ -1,6 +1,6 @@ import Header from '@/components/common/Header/Header'; import NavigationBar from '@/components/common/Navbar/NavigationBar'; -import Setting from '@/components/myPage/setting/Setting'; +import Setting from '@/components/myPage/setting/setting'; export default function Home() { return ( diff --git a/src/pages/my/withdrawal/index.page.tsx b/src/pages/my/withdrawal/index.page.tsx index 5ad828ba..48d6d236 100644 --- a/src/pages/my/withdrawal/index.page.tsx +++ b/src/pages/my/withdrawal/index.page.tsx @@ -1,6 +1,5 @@ import Header from '@/components/common/Header/Header'; -import NavigationBar from '@/components/common/Navbar/NavigationBar'; -import Withdrawal from '@/components/myPage/withdrawal/Withdrawal'; +import Withdrawal from '@/components/myPage/withdrawal/withdrawal'; export default function Home() { return ( diff --git a/src/types/course.ts b/src/types/course.ts index 759d027e..9bc898fd 100644 --- a/src/types/course.ts +++ b/src/types/course.ts @@ -4,7 +4,7 @@ export interface CourseResponse { data: Course[]; } -interface Course { +export interface Course { id: number; name: string; videos: Video[]; From 15fccc8ee597becbd0075eacb4da37b15183b001 Mon Sep 17 00:00:00 2001 From: halfmoon-mind <5338095@gmail.com> Date: Mon, 11 Dec 2023 00:15:36 +0900 Subject: [PATCH 3/6] =?UTF-8?q?feat:=20=EC=9E=90=EB=8F=99=20PR=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..28eb7875 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +- @halfmoon-mind @ChoiSangwon @JooHui-void @SujinKim1127 @jwo0o0 @chan0310 From 7d97864cce66a42152d7757bc4aaa6c1d4d65475 Mon Sep 17 00:00:00 2001 From: halfmoon-mind <5338095@gmail.com> Date: Mon, 11 Dec 2023 00:19:21 +0900 Subject: [PATCH 4/6] =?UTF-8?q?fix:=20=EB=85=B8=EB=93=9C=20=EB=B2=84?= =?UTF-8?q?=EC=A0=84=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pull_request_action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request_action.yml b/.github/workflows/pull_request_action.yml index c124b61b..7633424a 100644 --- a/.github/workflows/pull_request_action.yml +++ b/.github/workflows/pull_request_action.yml @@ -14,7 +14,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v1 with: - node-version: '14' + node-version: '16' - name: Install dependencies run: yarn install From d8f5c89e9fc3b677346469263c80469f1330d798 Mon Sep 17 00:00:00 2001 From: halfmoon-mind <5338095@gmail.com> Date: Mon, 11 Dec 2023 00:23:09 +0900 Subject: [PATCH 5/6] =?UTF-8?q?fix:=20=EC=A0=88=EB=8C=80=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Calendar/AlarmSetting/AlarmSetting.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Calendar/AlarmSetting/AlarmSetting.tsx b/src/components/Calendar/AlarmSetting/AlarmSetting.tsx index 8a4ec177..45b37d44 100644 --- a/src/components/Calendar/AlarmSetting/AlarmSetting.tsx +++ b/src/components/Calendar/AlarmSetting/AlarmSetting.tsx @@ -5,10 +5,9 @@ import video from '@icons/icon/LectureAssignment/Video.svg'; import comment from '@icons/icon/LectureAssignment/Comment.svg'; import assignment from '@icons/icon/LectureAssignment/Assignment.svg'; import Image from 'next/image'; -import SubjectTitle from '../SubjectTitle'; import { SubjectDTO } from '@/types/Subject'; - import { TaskProps } from '@/types/Task'; +import SubjectTitle from '@/components/Calendar/SubjectTitle/index'; interface AlarmProps { subjects: SubjectDTO[]; From b97b408853b6e3b768738fc4560ee9724635f86b Mon Sep 17 00:00:00 2001 From: halfmoon-mind <5338095@gmail.com> Date: Sun, 17 Dec 2023 19:02:55 +0900 Subject: [PATCH 6/6] fix: add param --- .../Subject/Subject.stories.tsx | 0 .../Subject/Subject.style.ts | 0 .../{calendar => Calendar}/Subject/Subject.tsx | 0 .../{calendar => Calendar}/Subject/index.ts | 0 .../SubjectContents/SubjectContents.stories.tsx | 0 .../SubjectContents/SubjectContents.style.ts | 0 .../SubjectContents/SubjectContents.tsx | 0 .../SubjectContents/index.ts | 0 .../SubjectList/SubjectList.stories.tsx | 0 .../SubjectList/SubjectList.style.ts | 0 .../SubjectList/SubjectList.tsx | 0 .../{calendar => Calendar}/SubjectList/index.ts | 0 .../SubjectTitle/SubjectTitle.stories.tsx | 0 .../SubjectTitle/SubjectTitle.style.ts | 0 .../SubjectTitle/SubjectTitle.tsx | 0 .../{calendar => Calendar}/SubjectTitle/index.ts | 0 .../{mypage => myPage}/Post/MyComment.tsx | 0 .../{mypage => myPage}/Post/MyPost.stories.tsx | 0 .../{mypage => myPage}/Post/MyPost.tsx | 0 .../{mypage => myPage}/Post/Mypost.style.tsx | 0 .../Post/Tab/MyPostsTab.stories.tsx | 0 .../Post/Tab/MyPostsTab.style.tsx | 0 .../{mypage => myPage}/Post/Tab/MyPostsTab.tsx | 0 .../ServiceNotice/ServiceNoticeItem.stories.tsx | 0 .../ServiceNotice/ServiceNoticeItem.tsx | 0 .../ServiceNotice/ServiceNoticeList.stories.tsx | 0 .../ServiceNotice/ServiceNoticeList.tsx | 0 .../info/ServiceNoticeInfo.stories.tsx | 0 .../ServiceNotice/info/ServiceNoticeInfo.tsx | 0 .../{mypage => myPage}/agree/Agree.stories.tsx | 0 .../{mypage => myPage}/agree/Agree.style.ts | 0 .../{mypage => myPage}/agree/Agree.tsx | 0 .../agree/info/AgreeInfo.stories.tsx | 0 .../agree/info/AgreeInfo.style.ts | 0 .../{mypage => myPage}/agree/info/AgreeInfo.tsx | 13 ++++++++++--- .../{mypage => myPage}/agree/info/AgreeText.tsx | 0 src/pages/my/agree/index.page.tsx | 10 ---------- src/pages/my/agree/info/index.page.tsx | 16 +--------------- 38 files changed, 11 insertions(+), 28 deletions(-) rename src/components/{calendar => Calendar}/Subject/Subject.stories.tsx (100%) rename src/components/{calendar => Calendar}/Subject/Subject.style.ts (100%) rename src/components/{calendar => Calendar}/Subject/Subject.tsx (100%) rename src/components/{calendar => Calendar}/Subject/index.ts (100%) rename src/components/{calendar => Calendar}/SubjectContents/SubjectContents.stories.tsx (100%) rename src/components/{calendar => Calendar}/SubjectContents/SubjectContents.style.ts (100%) rename src/components/{calendar => Calendar}/SubjectContents/SubjectContents.tsx (100%) rename src/components/{calendar => Calendar}/SubjectContents/index.ts (100%) rename src/components/{calendar => Calendar}/SubjectList/SubjectList.stories.tsx (100%) rename src/components/{calendar => Calendar}/SubjectList/SubjectList.style.ts (100%) rename src/components/{calendar => Calendar}/SubjectList/SubjectList.tsx (100%) rename src/components/{calendar => Calendar}/SubjectList/index.ts (100%) rename src/components/{calendar => Calendar}/SubjectTitle/SubjectTitle.stories.tsx (100%) rename src/components/{calendar => Calendar}/SubjectTitle/SubjectTitle.style.ts (100%) rename src/components/{calendar => Calendar}/SubjectTitle/SubjectTitle.tsx (100%) rename src/components/{calendar => Calendar}/SubjectTitle/index.ts (100%) rename src/components/{mypage => myPage}/Post/MyComment.tsx (100%) rename src/components/{mypage => myPage}/Post/MyPost.stories.tsx (100%) rename src/components/{mypage => myPage}/Post/MyPost.tsx (100%) rename src/components/{mypage => myPage}/Post/Mypost.style.tsx (100%) rename src/components/{mypage => myPage}/Post/Tab/MyPostsTab.stories.tsx (100%) rename src/components/{mypage => myPage}/Post/Tab/MyPostsTab.style.tsx (100%) rename src/components/{mypage => myPage}/Post/Tab/MyPostsTab.tsx (100%) rename src/components/{mypage => myPage}/ServiceNotice/ServiceNoticeItem.stories.tsx (100%) rename src/components/{mypage => myPage}/ServiceNotice/ServiceNoticeItem.tsx (100%) rename src/components/{mypage => myPage}/ServiceNotice/ServiceNoticeList.stories.tsx (100%) rename src/components/{mypage => myPage}/ServiceNotice/ServiceNoticeList.tsx (100%) rename src/components/{mypage => myPage}/ServiceNotice/info/ServiceNoticeInfo.stories.tsx (100%) rename src/components/{mypage => myPage}/ServiceNotice/info/ServiceNoticeInfo.tsx (100%) rename src/components/{mypage => myPage}/agree/Agree.stories.tsx (100%) rename src/components/{mypage => myPage}/agree/Agree.style.ts (100%) rename src/components/{mypage => myPage}/agree/Agree.tsx (100%) rename src/components/{mypage => myPage}/agree/info/AgreeInfo.stories.tsx (100%) rename src/components/{mypage => myPage}/agree/info/AgreeInfo.style.ts (100%) rename src/components/{mypage => myPage}/agree/info/AgreeInfo.tsx (70%) rename src/components/{mypage => myPage}/agree/info/AgreeText.tsx (100%) diff --git a/src/components/calendar/Subject/Subject.stories.tsx b/src/components/Calendar/Subject/Subject.stories.tsx similarity index 100% rename from src/components/calendar/Subject/Subject.stories.tsx rename to src/components/Calendar/Subject/Subject.stories.tsx diff --git a/src/components/calendar/Subject/Subject.style.ts b/src/components/Calendar/Subject/Subject.style.ts similarity index 100% rename from src/components/calendar/Subject/Subject.style.ts rename to src/components/Calendar/Subject/Subject.style.ts diff --git a/src/components/calendar/Subject/Subject.tsx b/src/components/Calendar/Subject/Subject.tsx similarity index 100% rename from src/components/calendar/Subject/Subject.tsx rename to src/components/Calendar/Subject/Subject.tsx diff --git a/src/components/calendar/Subject/index.ts b/src/components/Calendar/Subject/index.ts similarity index 100% rename from src/components/calendar/Subject/index.ts rename to src/components/Calendar/Subject/index.ts diff --git a/src/components/calendar/SubjectContents/SubjectContents.stories.tsx b/src/components/Calendar/SubjectContents/SubjectContents.stories.tsx similarity index 100% rename from src/components/calendar/SubjectContents/SubjectContents.stories.tsx rename to src/components/Calendar/SubjectContents/SubjectContents.stories.tsx diff --git a/src/components/calendar/SubjectContents/SubjectContents.style.ts b/src/components/Calendar/SubjectContents/SubjectContents.style.ts similarity index 100% rename from src/components/calendar/SubjectContents/SubjectContents.style.ts rename to src/components/Calendar/SubjectContents/SubjectContents.style.ts diff --git a/src/components/calendar/SubjectContents/SubjectContents.tsx b/src/components/Calendar/SubjectContents/SubjectContents.tsx similarity index 100% rename from src/components/calendar/SubjectContents/SubjectContents.tsx rename to src/components/Calendar/SubjectContents/SubjectContents.tsx diff --git a/src/components/calendar/SubjectContents/index.ts b/src/components/Calendar/SubjectContents/index.ts similarity index 100% rename from src/components/calendar/SubjectContents/index.ts rename to src/components/Calendar/SubjectContents/index.ts diff --git a/src/components/calendar/SubjectList/SubjectList.stories.tsx b/src/components/Calendar/SubjectList/SubjectList.stories.tsx similarity index 100% rename from src/components/calendar/SubjectList/SubjectList.stories.tsx rename to src/components/Calendar/SubjectList/SubjectList.stories.tsx diff --git a/src/components/calendar/SubjectList/SubjectList.style.ts b/src/components/Calendar/SubjectList/SubjectList.style.ts similarity index 100% rename from src/components/calendar/SubjectList/SubjectList.style.ts rename to src/components/Calendar/SubjectList/SubjectList.style.ts diff --git a/src/components/calendar/SubjectList/SubjectList.tsx b/src/components/Calendar/SubjectList/SubjectList.tsx similarity index 100% rename from src/components/calendar/SubjectList/SubjectList.tsx rename to src/components/Calendar/SubjectList/SubjectList.tsx diff --git a/src/components/calendar/SubjectList/index.ts b/src/components/Calendar/SubjectList/index.ts similarity index 100% rename from src/components/calendar/SubjectList/index.ts rename to src/components/Calendar/SubjectList/index.ts diff --git a/src/components/calendar/SubjectTitle/SubjectTitle.stories.tsx b/src/components/Calendar/SubjectTitle/SubjectTitle.stories.tsx similarity index 100% rename from src/components/calendar/SubjectTitle/SubjectTitle.stories.tsx rename to src/components/Calendar/SubjectTitle/SubjectTitle.stories.tsx diff --git a/src/components/calendar/SubjectTitle/SubjectTitle.style.ts b/src/components/Calendar/SubjectTitle/SubjectTitle.style.ts similarity index 100% rename from src/components/calendar/SubjectTitle/SubjectTitle.style.ts rename to src/components/Calendar/SubjectTitle/SubjectTitle.style.ts diff --git a/src/components/calendar/SubjectTitle/SubjectTitle.tsx b/src/components/Calendar/SubjectTitle/SubjectTitle.tsx similarity index 100% rename from src/components/calendar/SubjectTitle/SubjectTitle.tsx rename to src/components/Calendar/SubjectTitle/SubjectTitle.tsx diff --git a/src/components/calendar/SubjectTitle/index.ts b/src/components/Calendar/SubjectTitle/index.ts similarity index 100% rename from src/components/calendar/SubjectTitle/index.ts rename to src/components/Calendar/SubjectTitle/index.ts diff --git a/src/components/mypage/Post/MyComment.tsx b/src/components/myPage/Post/MyComment.tsx similarity index 100% rename from src/components/mypage/Post/MyComment.tsx rename to src/components/myPage/Post/MyComment.tsx diff --git a/src/components/mypage/Post/MyPost.stories.tsx b/src/components/myPage/Post/MyPost.stories.tsx similarity index 100% rename from src/components/mypage/Post/MyPost.stories.tsx rename to src/components/myPage/Post/MyPost.stories.tsx diff --git a/src/components/mypage/Post/MyPost.tsx b/src/components/myPage/Post/MyPost.tsx similarity index 100% rename from src/components/mypage/Post/MyPost.tsx rename to src/components/myPage/Post/MyPost.tsx diff --git a/src/components/mypage/Post/Mypost.style.tsx b/src/components/myPage/Post/Mypost.style.tsx similarity index 100% rename from src/components/mypage/Post/Mypost.style.tsx rename to src/components/myPage/Post/Mypost.style.tsx diff --git a/src/components/mypage/Post/Tab/MyPostsTab.stories.tsx b/src/components/myPage/Post/Tab/MyPostsTab.stories.tsx similarity index 100% rename from src/components/mypage/Post/Tab/MyPostsTab.stories.tsx rename to src/components/myPage/Post/Tab/MyPostsTab.stories.tsx diff --git a/src/components/mypage/Post/Tab/MyPostsTab.style.tsx b/src/components/myPage/Post/Tab/MyPostsTab.style.tsx similarity index 100% rename from src/components/mypage/Post/Tab/MyPostsTab.style.tsx rename to src/components/myPage/Post/Tab/MyPostsTab.style.tsx diff --git a/src/components/mypage/Post/Tab/MyPostsTab.tsx b/src/components/myPage/Post/Tab/MyPostsTab.tsx similarity index 100% rename from src/components/mypage/Post/Tab/MyPostsTab.tsx rename to src/components/myPage/Post/Tab/MyPostsTab.tsx diff --git a/src/components/mypage/ServiceNotice/ServiceNoticeItem.stories.tsx b/src/components/myPage/ServiceNotice/ServiceNoticeItem.stories.tsx similarity index 100% rename from src/components/mypage/ServiceNotice/ServiceNoticeItem.stories.tsx rename to src/components/myPage/ServiceNotice/ServiceNoticeItem.stories.tsx diff --git a/src/components/mypage/ServiceNotice/ServiceNoticeItem.tsx b/src/components/myPage/ServiceNotice/ServiceNoticeItem.tsx similarity index 100% rename from src/components/mypage/ServiceNotice/ServiceNoticeItem.tsx rename to src/components/myPage/ServiceNotice/ServiceNoticeItem.tsx diff --git a/src/components/mypage/ServiceNotice/ServiceNoticeList.stories.tsx b/src/components/myPage/ServiceNotice/ServiceNoticeList.stories.tsx similarity index 100% rename from src/components/mypage/ServiceNotice/ServiceNoticeList.stories.tsx rename to src/components/myPage/ServiceNotice/ServiceNoticeList.stories.tsx diff --git a/src/components/mypage/ServiceNotice/ServiceNoticeList.tsx b/src/components/myPage/ServiceNotice/ServiceNoticeList.tsx similarity index 100% rename from src/components/mypage/ServiceNotice/ServiceNoticeList.tsx rename to src/components/myPage/ServiceNotice/ServiceNoticeList.tsx diff --git a/src/components/mypage/ServiceNotice/info/ServiceNoticeInfo.stories.tsx b/src/components/myPage/ServiceNotice/info/ServiceNoticeInfo.stories.tsx similarity index 100% rename from src/components/mypage/ServiceNotice/info/ServiceNoticeInfo.stories.tsx rename to src/components/myPage/ServiceNotice/info/ServiceNoticeInfo.stories.tsx diff --git a/src/components/mypage/ServiceNotice/info/ServiceNoticeInfo.tsx b/src/components/myPage/ServiceNotice/info/ServiceNoticeInfo.tsx similarity index 100% rename from src/components/mypage/ServiceNotice/info/ServiceNoticeInfo.tsx rename to src/components/myPage/ServiceNotice/info/ServiceNoticeInfo.tsx diff --git a/src/components/mypage/agree/Agree.stories.tsx b/src/components/myPage/agree/Agree.stories.tsx similarity index 100% rename from src/components/mypage/agree/Agree.stories.tsx rename to src/components/myPage/agree/Agree.stories.tsx diff --git a/src/components/mypage/agree/Agree.style.ts b/src/components/myPage/agree/Agree.style.ts similarity index 100% rename from src/components/mypage/agree/Agree.style.ts rename to src/components/myPage/agree/Agree.style.ts diff --git a/src/components/mypage/agree/Agree.tsx b/src/components/myPage/agree/Agree.tsx similarity index 100% rename from src/components/mypage/agree/Agree.tsx rename to src/components/myPage/agree/Agree.tsx diff --git a/src/components/mypage/agree/info/AgreeInfo.stories.tsx b/src/components/myPage/agree/info/AgreeInfo.stories.tsx similarity index 100% rename from src/components/mypage/agree/info/AgreeInfo.stories.tsx rename to src/components/myPage/agree/info/AgreeInfo.stories.tsx diff --git a/src/components/mypage/agree/info/AgreeInfo.style.ts b/src/components/myPage/agree/info/AgreeInfo.style.ts similarity index 100% rename from src/components/mypage/agree/info/AgreeInfo.style.ts rename to src/components/myPage/agree/info/AgreeInfo.style.ts diff --git a/src/components/mypage/agree/info/AgreeInfo.tsx b/src/components/myPage/agree/info/AgreeInfo.tsx similarity index 70% rename from src/components/mypage/agree/info/AgreeInfo.tsx rename to src/components/myPage/agree/info/AgreeInfo.tsx index a12094a9..ea4f3dd4 100644 --- a/src/components/mypage/agree/info/AgreeInfo.tsx +++ b/src/components/myPage/agree/info/AgreeInfo.tsx @@ -3,19 +3,26 @@ import * as styles from './AgreeInfo.style'; import NavigationBar from '@/components/common/Navbar/NavigationBar'; import { useRecoilValue } from 'recoil'; import { userNavAtom } from '@/states/userNavAtom'; +import { useEffect, useState } from 'react'; const AgreeInfo = () => { const activeNavType = useRecoilValue(userNavAtom).activeNavType; + // add state + const [url, setUrl] = useState(); + const [param, setParam] = useState(''); - const url = new URL(window.location.href); - const paramValue = url.searchParams.get('param'); + useEffect(() => { + const url = new URL(window.location.href); + setUrl(url); + setParam(url?.searchParams.get('param')); + }, []); return ( <>
헤더자리
-
{paramValue}
+
{param}
diff --git a/src/components/mypage/agree/info/AgreeText.tsx b/src/components/myPage/agree/info/AgreeText.tsx similarity index 100% rename from src/components/mypage/agree/info/AgreeText.tsx rename to src/components/myPage/agree/info/AgreeText.tsx diff --git a/src/pages/my/agree/index.page.tsx b/src/pages/my/agree/index.page.tsx index 39aa22af..05d18041 100644 --- a/src/pages/my/agree/index.page.tsx +++ b/src/pages/my/agree/index.page.tsx @@ -1,18 +1,8 @@ -import Head from 'next/head'; -import { Inter } from 'next/font/google'; import Agree from '@/components/myPage/agree/Agree'; -const inter = Inter({ subsets: ['latin'] }); - export default function Home() { return ( <> - - Create Next App - - - - ); diff --git a/src/pages/my/agree/info/index.page.tsx b/src/pages/my/agree/info/index.page.tsx index 524e0df7..32bced10 100644 --- a/src/pages/my/agree/info/index.page.tsx +++ b/src/pages/my/agree/info/index.page.tsx @@ -1,19 +1,5 @@ -import Head from 'next/head'; -import { Inter } from 'next/font/google'; import AgreeInfo from '@/components/myPage/agree/info/AgreeInfo'; -const inter = Inter({ subsets: ['latin'] }); - export default function Home() { - return ( - <> - - Create Next App - - - - - - - ); + return ; }