From cf25e93fafb932b7c92f51e0441ebafdc06bee78 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 11:56:42 +0900 Subject: [PATCH 01/27] feat :: mypage router --- packages/user/src/router.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/user/src/router.tsx b/packages/user/src/router.tsx index e0f6496..5da8496 100644 --- a/packages/user/src/router.tsx +++ b/packages/user/src/router.tsx @@ -6,6 +6,7 @@ import { MyProject } from './pages/Projects/MyProject'; import { SignIn } from './pages/SignIn'; import { SignUp } from './pages/SignUp'; import { Registration } from './pages/Registration'; +import { MyPage } from './pages/MyPage'; export const Router = createBrowserRouter([ { @@ -41,6 +42,10 @@ export const Router = createBrowserRouter([ path: 'register', element: , }, + { + path: 'my', + element: , + }, ], errorElement: <>error, }, From bca005f8296aace304f36ca95cce12ae9041b931 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 12:20:15 +0900 Subject: [PATCH 02/27] design :: mypage header --- packages/user/src/pages/MyPage.tsx | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 packages/user/src/pages/MyPage.tsx diff --git a/packages/user/src/pages/MyPage.tsx b/packages/user/src/pages/MyPage.tsx new file mode 100644 index 0000000..f8f4bed --- /dev/null +++ b/packages/user/src/pages/MyPage.tsx @@ -0,0 +1,42 @@ +import styled from '@emotion/styled'; +import { theme } from '@merge/design-system'; + +export const MyPage = () => { + return ( + +
+
+ 1학년 1반 1번 + 강해민 +
+ https://github.com/nimeahgnak +
+
+ ); +}; + +const Wrapper = styled.div` + padding: 66px 396px 0 396px; +`; + +const Header = styled.div` + width: 1128px; + height: 70px; + padding: 0 40px; + display: flex; + justify-content: space-between; + background-color: ${theme.color.gray50}; + border-radius: 8px; + ${theme.font.subTitle2}; + align-items: center; + & > div { + color: ${theme.color.primary800}; + span { + color: ${theme.color.gray800}; + margin-left: 20px; + } + } + & > span { + color: ${theme.color.link800}; + } +`; From b45b5547ee2e44fb0e68d54ea50be32d54896aad Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 12:20:29 +0900 Subject: [PATCH 03/27] =?UTF-8?q?chore=20::=20=EB=A7=81=ED=81=AC=EB=8A=94?= =?UTF-8?q?=20a=ED=83=9C=EA=B7=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/pages/MyPage.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/user/src/pages/MyPage.tsx b/packages/user/src/pages/MyPage.tsx index f8f4bed..d867caf 100644 --- a/packages/user/src/pages/MyPage.tsx +++ b/packages/user/src/pages/MyPage.tsx @@ -9,7 +9,7 @@ export const MyPage = () => { 1학년 1반 1번 강해민 - https://github.com/nimeahgnak + https://github.com/nimeahgnak ); @@ -36,7 +36,8 @@ const Header = styled.div` margin-left: 20px; } } - & > span { + & > a { + text-decoration: none; color: ${theme.color.link800}; } `; From 8d8a8b04a648b59e1bb52a485ff2ed8a7cec8993 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 12:32:26 +0900 Subject: [PATCH 04/27] design :: global style --- packages/design-system/src/style/GlobalStyle.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/design-system/src/style/GlobalStyle.tsx b/packages/design-system/src/style/GlobalStyle.tsx index 7f9776c..7b58974 100644 --- a/packages/design-system/src/style/GlobalStyle.tsx +++ b/packages/design-system/src/style/GlobalStyle.tsx @@ -38,6 +38,7 @@ const style = css` list-style: none; font-style: normal; font-family: 'Pretendard', sans-serif; + overflow-x: hidden; &::-webkit-scrollbar { width: 8px; From bb2738b8653160bb865a64fe084d630488d466eb Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 12:32:41 +0900 Subject: [PATCH 05/27] design :: layout --- packages/user/src/pages/MyPage.tsx | 52 ++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/packages/user/src/pages/MyPage.tsx b/packages/user/src/pages/MyPage.tsx index d867caf..c67549e 100644 --- a/packages/user/src/pages/MyPage.tsx +++ b/packages/user/src/pages/MyPage.tsx @@ -1,5 +1,34 @@ import styled from '@emotion/styled'; import { theme } from '@merge/design-system'; +import dummyLogoImg from '../assets/logo.svg'; + +type projectType = { + name: string; + team: string; + data: string; + logo: string; +}; + +const dummyProjects: projectType[] = [ + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, + { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, +]; export const MyPage = () => { return ( @@ -11,12 +40,19 @@ export const MyPage = () => { https://github.com/nimeahgnak + + {dummyProjects.map((element) => { + return
; + })} +
); }; const Wrapper = styled.div` padding: 66px 396px 0 396px; + height: calc(100vh - 52px); + overflow-y: auto; `; const Header = styled.div` @@ -41,3 +77,19 @@ const Header = styled.div` color: ${theme.color.link800}; } `; + +const Container = styled.div` + width: 1132px; + display: flex; + justify-content: start; + gap: 53px; + flex-wrap: wrap; + margin-top: 56px; + margin-bottom: 60px; +`; + +const Div = styled.div` + width: 184px; + height: 230px; + background-color: black; +`; From 7bca225bfd5e85f740b6285814ec9f1bb6570493 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 14:08:52 +0900 Subject: [PATCH 06/27] =?UTF-8?q?design=20::=20layout=20=EC=9E=AC=EC=A1=B0?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/pages/MyPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/user/src/pages/MyPage.tsx b/packages/user/src/pages/MyPage.tsx index c67549e..c52def0 100644 --- a/packages/user/src/pages/MyPage.tsx +++ b/packages/user/src/pages/MyPage.tsx @@ -79,10 +79,10 @@ const Header = styled.div` `; const Container = styled.div` - width: 1132px; + width: 1128px; display: flex; justify-content: start; - gap: 53px; + gap: 52px; flex-wrap: wrap; margin-top: 56px; margin-bottom: 60px; From c7bc7914ae8ab1f799b2acc186c7490f3a79142f Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 14:34:24 +0900 Subject: [PATCH 07/27] =?UTF-8?q?fix=20::=20=EC=98=A4=ED=83=80=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/design-system/src/style/GlobalStyle.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/design-system/src/style/GlobalStyle.tsx b/packages/design-system/src/style/GlobalStyle.tsx index 7b58974..c1e3bf6 100644 --- a/packages/design-system/src/style/GlobalStyle.tsx +++ b/packages/design-system/src/style/GlobalStyle.tsx @@ -19,7 +19,7 @@ const style = css` font-family: 'Pretendard'; font-weight: 500; font-style: normal; - src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Medeum.woff') format('woff'); + src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Medium.woff') format('woff'); } @font-face { From f521bb572e8d67b472408d6ab06940d07e304220 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 14:47:19 +0900 Subject: [PATCH 08/27] =?UTF-8?q?design=20::=20mypage=20=EC=99=84=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/pages/MyPage.tsx | 70 +++++++++++++++++++----------- 1 file changed, 44 insertions(+), 26 deletions(-) diff --git a/packages/user/src/pages/MyPage.tsx b/packages/user/src/pages/MyPage.tsx index c52def0..ea06653 100644 --- a/packages/user/src/pages/MyPage.tsx +++ b/packages/user/src/pages/MyPage.tsx @@ -5,30 +5,11 @@ import dummyLogoImg from '../assets/logo.svg'; type projectType = { name: string; team: string; - data: string; + date: string; logo: string; }; -const dummyProjects: projectType[] = [ - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, - { name: '머지merge', team: '정', data: '2023-01-01', logo: dummyLogoImg }, -]; +const dummyProjects: projectType[] = [{ name: '머지merge', team: '정', date: '2023-01-01', logo: dummyLogoImg }]; export const MyPage = () => { return ( @@ -41,8 +22,15 @@ export const MyPage = () => { https://github.com/nimeahgnak - {dummyProjects.map((element) => { - return
; + {dummyProjects.map((element, index) => { + return ( + + +
{element.name}
+
{element.team}
+
{element.date}
+
+ ); })}
@@ -88,8 +76,38 @@ const Container = styled.div` margin-bottom: 60px; `; -const Div = styled.div` +const Project = styled.div` width: 184px; - height: 230px; - background-color: black; + height: 264px; + background-color: white; + border: 1px solid ${theme.color.gray100}; + padding: 12px; + border-radius: 8px; + img { + width: 160px; + height: 160px; + border-radius: 4px; + } + & > .first { + ${theme.font.subTitle2}; + color: ${theme.color.gray900}; + } + & > .second { + ${theme.font.subTitle3}; + color: ${theme.color.gray700}; + margin: 4px 0 8px 0; + } + & > .third { + width: 58px; + height: 22px; + font-size: 8px; + font-weight: 500; + letter-spacing: 0.008px; + color: ${theme.color.gray800}; + background-color: ${theme.color.gray100}; + border-radius: 4px; + display: flex; + justify-content: center; + align-items: center; + } `; From c3e1ab68cc1b1c62477629ea102d9ac7611bafde Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 15:12:33 +0900 Subject: [PATCH 09/27] =?UTF-8?q?design=20::=20=EB=81=9D=EC=9D=B8=20?= =?UTF-8?q?=EC=A4=84..=20=EA=B4=80=EB=A6=AC=EC=9E=90=20=EB=B1=83=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/pages/MyPage.tsx | 77 ++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 25 deletions(-) diff --git a/packages/user/src/pages/MyPage.tsx b/packages/user/src/pages/MyPage.tsx index ea06653..0820470 100644 --- a/packages/user/src/pages/MyPage.tsx +++ b/packages/user/src/pages/MyPage.tsx @@ -7,9 +7,13 @@ type projectType = { team: string; date: string; logo: string; + admin: boolean; }; -const dummyProjects: projectType[] = [{ name: '머지merge', team: '정', date: '2023-01-01', logo: dummyLogoImg }]; +const dummyProjects: projectType[] = [ + { name: '머지merge', team: '정', date: '2023-01-01', logo: dummyLogoImg, admin: true }, + { name: '머지merge', team: '정', date: '2023-01-01', logo: dummyLogoImg, admin: false }, +]; export const MyPage = () => { return ( @@ -26,9 +30,12 @@ export const MyPage = () => { return ( -
{element.name}
-
{element.team}
-
{element.date}
+
+ {element.admin && 관리자} +
{element.name}
+
{element.team}
+
{element.date}
+
); })} @@ -88,26 +95,46 @@ const Project = styled.div` height: 160px; border-radius: 4px; } - & > .first { - ${theme.font.subTitle2}; - color: ${theme.color.gray900}; - } - & > .second { - ${theme.font.subTitle3}; - color: ${theme.color.gray700}; - margin: 4px 0 8px 0; - } - & > .third { - width: 58px; - height: 22px; - font-size: 8px; - font-weight: 500; - letter-spacing: 0.008px; - color: ${theme.color.gray800}; - background-color: ${theme.color.gray100}; - border-radius: 4px; - display: flex; - justify-content: center; - align-items: center; + > div { + position: relative; + & > .first { + ${theme.font.subTitle2}; + color: ${theme.color.gray900}; + } + & > .second { + ${theme.font.subTitle3}; + color: ${theme.color.gray700}; + margin: 4px 0 8px 0; + } + & > .third { + width: 58px; + height: 22px; + font-size: 8px; + font-weight: 500; + letter-spacing: 0.008px; + color: ${theme.color.gray800}; + background-color: ${theme.color.gray100}; + border-radius: 4px; + display: flex; + justify-content: center; + align-items: center; + } } `; + +const Badge = styled.div` + position: absolute; + right: 0px; + top: 0; + width: 28px; + height: 28px; + background-color: ${theme.color.primaryA200}; + font-size: 8px; + font-weight: 500; + letter-spacing: 0.008px; + border-radius: 50%; + color: ${theme.color.white}; + display: flex; + justify-content: center; + align-items: center; +`; From cab0159bf6897242b63cfba42a2501e8deb58779 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 15:30:09 +0900 Subject: [PATCH 10/27] =?UTF-8?q?feat=20::=20=EC=88=A8=EA=B8=B4=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8=20=EB=B3=B4=EA=B8=B0=20?= =?UTF-8?q?=EB=9D=BC=EC=9A=B0=ED=84=B0=20=EB=93=B1=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/pages/HideProjects.tsx | 3 +++ packages/user/src/pages/MyPage.tsx | 21 ++++++++++++++++++++- packages/user/src/router.tsx | 6 +++++- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 packages/user/src/pages/HideProjects.tsx diff --git a/packages/user/src/pages/HideProjects.tsx b/packages/user/src/pages/HideProjects.tsx new file mode 100644 index 0000000..cac5cf9 --- /dev/null +++ b/packages/user/src/pages/HideProjects.tsx @@ -0,0 +1,3 @@ +export const HideProjects = () => { + return
; +}; diff --git a/packages/user/src/pages/MyPage.tsx b/packages/user/src/pages/MyPage.tsx index 0820470..172eb3b 100644 --- a/packages/user/src/pages/MyPage.tsx +++ b/packages/user/src/pages/MyPage.tsx @@ -1,6 +1,7 @@ import styled from '@emotion/styled'; -import { theme } from '@merge/design-system'; +import { Button, theme } from '@merge/design-system'; import dummyLogoImg from '../assets/logo.svg'; +import { Link } from 'react-router-dom'; type projectType = { name: string; @@ -40,6 +41,17 @@ export const MyPage = () => { ); })} + + + ); }; @@ -138,3 +150,10 @@ const Badge = styled.div` justify-content: center; align-items: center; `; + +const ButtonContainer = styled(Link)` + position: absolute; + right: 36px; + bottom: 72px; + text-decoration: none; +`; diff --git a/packages/user/src/router.tsx b/packages/user/src/router.tsx index 5da8496..a3509e9 100644 --- a/packages/user/src/router.tsx +++ b/packages/user/src/router.tsx @@ -7,6 +7,7 @@ import { SignIn } from './pages/SignIn'; import { SignUp } from './pages/SignUp'; import { Registration } from './pages/Registration'; import { MyPage } from './pages/MyPage'; +import { HideProjects } from './pages/HideProjects'; export const Router = createBrowserRouter([ { @@ -44,7 +45,10 @@ export const Router = createBrowserRouter([ }, { path: 'my', - element: , + children: [ + { index: true, element: }, + { path: 'hide', element: }, + ], }, ], errorElement: <>error, From 9a22b93655f8dc4b371a49e3d4f5c5392e737184 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 15:33:20 +0900 Subject: [PATCH 11/27] =?UTF-8?q?design=20::=20header=20=EB=B6=80=EB=B6=84?= =?UTF-8?q?=20=ED=81=AC=EA=B8=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/components/Header/Menu.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/user/src/components/Header/Menu.tsx b/packages/user/src/components/Header/Menu.tsx index 17468ac..e5661f9 100644 --- a/packages/user/src/components/Header/Menu.tsx +++ b/packages/user/src/components/Header/Menu.tsx @@ -41,6 +41,7 @@ const Wrapper = styled.div` display: flex; align-items: center; gap: 24px; + height: 32px; `; const Profile = styled.div` From b33733ab866ad814fd68a54f972fdfcb3fd9f794 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 15:35:35 +0900 Subject: [PATCH 12/27] =?UTF-8?q?desing=20::=20=EB=82=98=EC=A4=91=EC=97=90?= =?UTF-8?q?=20=EC=9D=B4=EC=83=81=ED=95=98=EB=A9=B4=20=EA=B3=A0=EC=B9=98?= =?UTF-8?q?=EA=B2=A0=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/design-system/src/style/GlobalStyle.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/design-system/src/style/GlobalStyle.tsx b/packages/design-system/src/style/GlobalStyle.tsx index c1e3bf6..9c739e5 100644 --- a/packages/design-system/src/style/GlobalStyle.tsx +++ b/packages/design-system/src/style/GlobalStyle.tsx @@ -38,7 +38,6 @@ const style = css` list-style: none; font-style: normal; font-family: 'Pretendard', sans-serif; - overflow-x: hidden; &::-webkit-scrollbar { width: 8px; From 9a2d17dc8629c0e9c028ea1f1ea1cfeb87f42c75 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 16:04:10 +0900 Subject: [PATCH 13/27] =?UTF-8?q?design=20::=20layout=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/pages/MyPage.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/user/src/pages/MyPage.tsx b/packages/user/src/pages/MyPage.tsx index 172eb3b..59d0e79 100644 --- a/packages/user/src/pages/MyPage.tsx +++ b/packages/user/src/pages/MyPage.tsx @@ -57,15 +57,18 @@ export const MyPage = () => { }; const Wrapper = styled.div` - padding: 66px 396px 0 396px; height: calc(100vh - 52px); overflow-y: auto; + display: flex; + flex-direction: column; + align-items: center; `; const Header = styled.div` width: 1128px; height: 70px; padding: 0 40px; + margin-top: 66px; display: flex; justify-content: space-between; background-color: ${theme.color.gray50}; From d2f2290d4c6410ac8a2e5714c7c467c63ef8a979 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 16:43:20 +0900 Subject: [PATCH 14/27] =?UTF-8?q?feat=20::=20=EC=9E=84=EC=8B=9C=20instance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/apis/axios.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/user/src/apis/axios.ts b/packages/user/src/apis/axios.ts index 923be9b..20e0b3b 100644 --- a/packages/user/src/apis/axios.ts +++ b/packages/user/src/apis/axios.ts @@ -30,6 +30,9 @@ instance.interceptors.response.use( } = err; if (status === 403) { //const token = Cookie.get('refreshToken'); + Cookie.remove('accessToken'); + Cookie.remove('refreshToken'); + window.location.href = '/login'; } else { toast.error('오류가 발생헀습니다'); return Promise.reject(err); From 6757791092fecbceb5a819db331d1365c83b2cb6 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 16:43:34 +0900 Subject: [PATCH 15/27] =?UTF-8?q?feat=20::=20=ED=97=A4=EB=8D=94=20?= =?UTF-8?q?=EC=BF=A0=ED=82=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/components/Header/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/user/src/components/Header/index.tsx b/packages/user/src/components/Header/index.tsx index 55571ee..42a0483 100644 --- a/packages/user/src/components/Header/index.tsx +++ b/packages/user/src/components/Header/index.tsx @@ -3,13 +3,16 @@ import { theme } from '@merge/design-system'; import { Logo } from './Logo'; import { Menu } from './Menu'; import { Outlet } from 'react-router-dom'; +import { Cookie } from '../../utils/cookie'; export const Header = () => { + const token = Cookie.get('accessToken'); + return ( <> - + From 10ab876a79eaa6310257ee207a787c6397f2b4fb Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 16:43:53 +0900 Subject: [PATCH 16/27] =?UTF-8?q?design=20::=20=EC=BB=A4=EC=84=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/components/Header/Menu.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/user/src/components/Header/Menu.tsx b/packages/user/src/components/Header/Menu.tsx index e5661f9..0223b77 100644 --- a/packages/user/src/components/Header/Menu.tsx +++ b/packages/user/src/components/Header/Menu.tsx @@ -49,4 +49,5 @@ const Profile = styled.div` height: 32px; border-radius: 50%; background-color: gray; + cursor: pointer; `; From cef8954926d060f2a42ba2efd65d52b39fcf421d Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 16:44:11 +0900 Subject: [PATCH 17/27] =?UTF-8?q?feat=20::=20=EB=A6=AC=EB=A1=9C=EB=94=A9?= =?UTF-8?q?=EB=90=98=EB=A9=B0=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/pages/SignIn.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/user/src/pages/SignIn.tsx b/packages/user/src/pages/SignIn.tsx index 5660f3b..3bfabec 100644 --- a/packages/user/src/pages/SignIn.tsx +++ b/packages/user/src/pages/SignIn.tsx @@ -1,4 +1,3 @@ -import { useNavigate } from 'react-router-dom'; import styled from '@emotion/styled'; import SignImg from '../assets/sign.svg'; import { theme, Input, Button } from '@merge/design-system'; @@ -10,7 +9,6 @@ import { signinType } from 'src/types/signType'; export const SignIn = () => { const [data, setData] = useState({ account_id: '', password: '' }); - const link = useNavigate(); const { account_id, password } = data; @@ -27,7 +25,7 @@ export const SignIn = () => { .then((res) => { Cookie.set('accessToken', res.data.access_token); Cookie.set('refreshToken', res.data.refresh_token); - link('/'); + window.location.href = '/'; }) .catch((err) => { console.error(err); From b47077c2b529201c1cb5f158d515a48257cb6e70 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 16:45:34 +0900 Subject: [PATCH 18/27] =?UTF-8?q?feat=20::=20=ED=94=84=EC=A0=9D=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=20=ED=8E=98=EC=9D=B4=EC=A7=80=EB=A1=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/components/Header/Menu.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/user/src/components/Header/Menu.tsx b/packages/user/src/components/Header/Menu.tsx index 0223b77..a64f1eb 100644 --- a/packages/user/src/components/Header/Menu.tsx +++ b/packages/user/src/components/Header/Menu.tsx @@ -13,18 +13,16 @@ export const Menu = ({ isLogin }: menuProps) => { link('/signin'); }; + const onRegister = () => { + link('/signin'); + }; + return ( {isLogin ? ( <> - From 7141e861cb305946a139c8654d340f79816d32e2 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 16:46:06 +0900 Subject: [PATCH 19/27] =?UTF-8?q?feat=20::=20mypage=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/components/Header/Menu.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/user/src/components/Header/Menu.tsx b/packages/user/src/components/Header/Menu.tsx index a64f1eb..267f9ec 100644 --- a/packages/user/src/components/Header/Menu.tsx +++ b/packages/user/src/components/Header/Menu.tsx @@ -1,6 +1,6 @@ import styled from '@emotion/styled'; import { Button } from '@merge/design-system'; -import { useNavigate } from 'react-router-dom'; +import { Link, useNavigate } from 'react-router-dom'; type menuProps = { isLogin: boolean; @@ -21,7 +21,7 @@ export const Menu = ({ isLogin }: menuProps) => { {isLogin ? ( <> - + @@ -42,7 +42,7 @@ const Wrapper = styled.div` height: 32px; `; -const Profile = styled.div` +const Profile = styled(Link)` width: 32px; height: 32px; border-radius: 50%; From 90744099f750c39bf0ec2c3a603af809194cbc53 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 16:46:43 +0900 Subject: [PATCH 20/27] =?UTF-8?q?fix=20::=20=EB=A7=81=ED=81=AC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/components/Header/Menu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/user/src/components/Header/Menu.tsx b/packages/user/src/components/Header/Menu.tsx index 267f9ec..6be88af 100644 --- a/packages/user/src/components/Header/Menu.tsx +++ b/packages/user/src/components/Header/Menu.tsx @@ -14,7 +14,7 @@ export const Menu = ({ isLogin }: menuProps) => { }; const onRegister = () => { - link('/signin'); + link('/register'); }; return ( From 9a9474c38a28e4b7f05e85e5eced553e31944162 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 16:47:16 +0900 Subject: [PATCH 21/27] =?UTF-8?q?chore=20::=20=EC=9E=84=EC=8B=9C=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=20=EB=B2=84=ED=8A=BC=20=EB=82=98=EC=A4=91?= =?UTF-8?q?=EC=97=90=20=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/components/Registration/SubHeader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/user/src/components/Registration/SubHeader.tsx b/packages/user/src/components/Registration/SubHeader.tsx index 32d37fd..b54be36 100644 --- a/packages/user/src/components/Registration/SubHeader.tsx +++ b/packages/user/src/components/Registration/SubHeader.tsx @@ -5,7 +5,7 @@ export const SubHeader = () => { return ( 프로젝트 등록하기 - + {/* */} ); }; From 96585d516d238406434fd6d03396919c084adae5 Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 19:08:45 +0900 Subject: [PATCH 22/27] =?UTF-8?q?create=20::=20project=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/types/projectType.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 packages/user/src/types/projectType.ts diff --git a/packages/user/src/types/projectType.ts b/packages/user/src/types/projectType.ts new file mode 100644 index 0000000..7756117 --- /dev/null +++ b/packages/user/src/types/projectType.ts @@ -0,0 +1,10 @@ +export type projectType = { + project_name_ko: string; + project_name_en: string; + team_name_en: string; + description: string; + github_url: string; + web_url: string; + play_store_url: string; + app_store_url: string; +}; From 3eb8980e3693e84784366522f1799e64299127fb Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 19:09:05 +0900 Subject: [PATCH 23/27] =?UTF-8?q?feat=20::=20mypage=20=EC=97=B0=EB=8F=99?= =?UTF-8?q?=20=ED=86=A0=EB=8C=80=EB=A1=9C=20view=20=EB=9D=84=EC=9A=B0?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/user/src/pages/MyPage.tsx | 53 +++++++++++++++++------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/packages/user/src/pages/MyPage.tsx b/packages/user/src/pages/MyPage.tsx index 59d0e79..dc14cac 100644 --- a/packages/user/src/pages/MyPage.tsx +++ b/packages/user/src/pages/MyPage.tsx @@ -1,22 +1,30 @@ +import { useEffect, useState } from 'react'; import styled from '@emotion/styled'; import { Button, theme } from '@merge/design-system'; -import dummyLogoImg from '../assets/logo.svg'; +import { getMyProject } from '../apis/project'; import { Link } from 'react-router-dom'; type projectType = { - name: string; - team: string; - date: string; + project_name_en: string; + team_name_en: string; + id: string; logo: string; - admin: boolean; }; -const dummyProjects: projectType[] = [ - { name: '머지merge', team: '정', date: '2023-01-01', logo: dummyLogoImg, admin: true }, - { name: '머지merge', team: '정', date: '2023-01-01', logo: dummyLogoImg, admin: false }, -]; +const dummyProjects: projectType[] = []; export const MyPage = () => { + const [projects, setProjects] = useState(); + + useEffect(() => { + getMyProject('dutexion@dsm.hs.kr') + .then((res) => { + setProjects(res.data); + console.log(res.data); + }) + .catch((err) => console.log(err)); + }, []); + return (
@@ -27,19 +35,20 @@ export const MyPage = () => { https://github.com/nimeahgnak
- {dummyProjects.map((element, index) => { - return ( - - -
- {element.admin && 관리자} -
{element.name}
-
{element.team}
-
{element.date}
-
-
- ); - })} + {projects && + projects.map((element, index) => { + return ( + + +
+ {/* {element.admin && 관리자} */} +
{element.project_name_en}
+
{element.team_name_en}
+ {/*
{element.}
*/} +
+
+ ); + })}
diff --git a/packages/user/src/pages/Registration.tsx b/packages/user/src/pages/Registration.tsx index 891c1e0..a272864 100644 --- a/packages/user/src/pages/Registration.tsx +++ b/packages/user/src/pages/Registration.tsx @@ -11,6 +11,7 @@ import { } from '../components/Registration/Form'; import { projectType } from '../types/projectType'; import { dataWhiteSpace } from '../func/dataWhiteSpace'; +import { createProject } from '../apis/project'; type pageKindType = 'register' | 'deploy'; @@ -118,11 +119,23 @@ export const Registration = () => { // , ]; + const onSubmit = () => { + if (logo && projectImage) { + createProject({ project: projectData, logo: logo, projectImage: projectImage }) + .then((res) => { + console.log(res); + }) + .catch((err) => { + console.log(err); + }); + } + }; + return ( - + {registerFormArray[nowProgress]} From 165b91f848e18ae3b924ed92fe604bf095ec0bda Mon Sep 17 00:00:00 2001 From: dutexion Date: Tue, 13 Feb 2024 21:01:39 +0900 Subject: [PATCH 27/27] =?UTF-8?q?chore=20::=20baseurl=EC=9D=84=20=EA=B3=B5?= =?UTF-8?q?=EA=B0=9C=ED=95=A9=EB=8B=88=EB=8B=A4!!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +-- packages/user/.env | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 packages/user/.env diff --git a/.gitignore b/.gitignore index f2a8f77..22e6ddc 100644 --- a/.gitignore +++ b/.gitignore @@ -11,5 +11,4 @@ #!.yarn/cache .pnp.* -node_modules -.env \ No newline at end of file +node_modules \ No newline at end of file diff --git a/packages/user/.env b/packages/user/.env new file mode 100644 index 0000000..9301709 --- /dev/null +++ b/packages/user/.env @@ -0,0 +1 @@ +VITE_SERVER_BASE_URL='https://prod-server.xquare.app/merge' \ No newline at end of file