From 2a9acda8146775458a56bceea97f24cace28a61b Mon Sep 17 00:00:00 2001 From: gudusol Date: Sun, 19 May 2024 03:03:11 +0900 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20=EB=A9=94=EC=9D=B8=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=ED=8D=BC=EB=B8=94=EB=A6=AC=EC=8B=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/home/Home.tsx | 34 ++++++++++++++++- .../components/StartButton/StartButton.tsx | 37 +++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 src/pages/home/components/StartButton/StartButton.tsx diff --git a/src/pages/home/Home.tsx b/src/pages/home/Home.tsx index c0b017e..d890f80 100644 --- a/src/pages/home/Home.tsx +++ b/src/pages/home/Home.tsx @@ -1,12 +1,44 @@ import styled from '@emotion/styled'; +import StartButton from './components/StartButton/StartButton'; +import { Generators } from '@styles/generator'; const Home = () => { - return Home; + return ( + + 투제로에 온 것을 환영해요! + + + + + + + ); }; export default Home; const HomeWrapper = styled.div` width: 100%; + height: 100%; background-color: ${({ theme }) => theme.color.gray02}; + ${Generators.flexGenerator('column', 'center', 'center')}; + padding: 2.4rem 1.6rem 3.2rem; +`; + +const WelcomeH1 = styled.h1` + margin-top: 2.8rem; + + font-size: 24px; + font-weight: 700; +`; + +const MainImage = styled.img` + margin-top: 6.7rem; + margin-bottom: 5.2rem; +`; + +const MainButtons = styled.section` + width: 100%; + ${Generators.flexGenerator('column')}; + gap: 1.6rem; `; diff --git a/src/pages/home/components/StartButton/StartButton.tsx b/src/pages/home/components/StartButton/StartButton.tsx new file mode 100644 index 0000000..1d15d61 --- /dev/null +++ b/src/pages/home/components/StartButton/StartButton.tsx @@ -0,0 +1,37 @@ +import styled from '@emotion/styled'; +import { Generators } from '@styles/generator'; + +export interface StartButtonProps { + descriptionLabel: string; + buttonLabel: string; + onClick?: React.MouseEventHandler; +} + +const StartButton = ({ descriptionLabel, buttonLabel, onClick = () => {} }: StartButtonProps) => { + return ( + + {descriptionLabel} + {buttonLabel} + + ); +}; + +export default StartButton; + +const StartButtonContainer = styled.button` + width: 100%; + height: 8rem; + ${Generators.flexGenerator('column', 'center', 'center')}; + gap: 1rem; + padding: 1.2rem 0; +`; + +const DescriptionSpan = styled.span` + font-size: 1.6rem; + font-weight: 400; +`; + +const ButtonSpan = styled.span` + font-size: 1.6rem; + font-weight: 700; +`; From 46f3fa99d74084c8e6c3cdab539f9ee89024d982 Mon Sep 17 00:00:00 2001 From: gudusol Date: Sun, 19 May 2024 03:09:03 +0900 Subject: [PATCH 2/6] =?UTF-8?q?feat:=20test=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Button/test.tsx | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 src/components/Button/test.tsx diff --git a/src/components/Button/test.tsx b/src/components/Button/test.tsx deleted file mode 100644 index 114ea6b..0000000 --- a/src/components/Button/test.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react' - -const test = () => { - return ( -
- -
- ) -} - -export default test From c12f2491c4cf123b1f08ade4389f5f196b7e21f2 Mon Sep 17 00:00:00 2001 From: gudusol Date: Sun, 19 May 2024 03:10:44 +0900 Subject: [PATCH 3/6] =?UTF-8?q?feat:=20=EC=A0=84=EC=B2=B4=20padding=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 --- src/styles/global.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/styles/global.ts b/src/styles/global.ts index dde3f9f..10e04e8 100644 --- a/src/styles/global.ts +++ b/src/styles/global.ts @@ -30,6 +30,7 @@ const GlobalStyle = css` #root { width: 37.5rem; min-height: 100vh; + padding: 0 1.6rem; } `; From c5c9bfb734ba3331109c4b6bafe17131ed5b3547 Mon Sep 17 00:00:00 2001 From: gudusol Date: Sun, 19 May 2024 03:16:34 +0900 Subject: [PATCH 4/6] =?UTF-8?q?feat:=20=EC=A0=84=EC=B2=B4=20padding=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/styles/global.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/styles/global.ts b/src/styles/global.ts index 10e04e8..dde3f9f 100644 --- a/src/styles/global.ts +++ b/src/styles/global.ts @@ -30,7 +30,6 @@ const GlobalStyle = css` #root { width: 37.5rem; min-height: 100vh; - padding: 0 1.6rem; } `; From 11f0f037e63da3c0023746aee68268178bfc5483 Mon Sep 17 00:00:00 2001 From: gudusol Date: Sun, 19 May 2024 03:26:45 +0900 Subject: [PATCH 5/6] =?UTF-8?q?feat:=20api=20=EC=97=B0=EB=8F=99=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/member/getMember.ts | 10 ++++++++++ src/apis/member/index.ts | 1 + src/pages/home/Home.tsx | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/apis/member/getMember.ts create mode 100644 src/apis/member/index.ts diff --git a/src/apis/member/getMember.ts b/src/apis/member/getMember.ts new file mode 100644 index 0000000..c4889f8 --- /dev/null +++ b/src/apis/member/getMember.ts @@ -0,0 +1,10 @@ +import instance from '../index'; + +export const getMeber = async (id: number) => { + const response = await instance.get('/member', { + headers: { + 'insta-id': id, + }, + }); + return response; +}; diff --git a/src/apis/member/index.ts b/src/apis/member/index.ts new file mode 100644 index 0000000..7df02c8 --- /dev/null +++ b/src/apis/member/index.ts @@ -0,0 +1 @@ +export { getMeber } from './getMember'; diff --git a/src/pages/home/Home.tsx b/src/pages/home/Home.tsx index d890f80..7f8afeb 100644 --- a/src/pages/home/Home.tsx +++ b/src/pages/home/Home.tsx @@ -1,6 +1,7 @@ import styled from '@emotion/styled'; import StartButton from './components/StartButton/StartButton'; import { Generators } from '@styles/generator'; +import { getMeber } from '@apis/member'; const Home = () => { return ( @@ -8,7 +9,7 @@ const Home = () => { 투제로에 온 것을 환영해요! - + getMeber(1)} /> From 15da9d950aeda304e8bbd20b3cfea9705b0f2106 Mon Sep 17 00:00:00 2001 From: gudusol Date: Sun, 19 May 2024 03:28:21 +0900 Subject: [PATCH 6/6] =?UTF-8?q?refactor:=20test=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Input/test.tsx | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 src/components/Input/test.tsx diff --git a/src/components/Input/test.tsx b/src/components/Input/test.tsx deleted file mode 100644 index 114ea6b..0000000 --- a/src/components/Input/test.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react' - -const test = () => { - return ( -
- -
- ) -} - -export default test