From b694ef7e4ee34a1d44c9762ffe0f9be6b319278d Mon Sep 17 00:00:00 2001
From: seoAreum <1971236@hansung.ac.kr>
Date: Sun, 14 Jan 2024 03:34:16 +0900
Subject: [PATCH 01/11] =?UTF-8?q?init:=20=EB=AA=A8=EB=8B=AC=20=EC=BB=B4?=
=?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=B4=88=EA=B8=B0=EC=84=B8?=
=?UTF-8?q?=ED=8C=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/common/Modal/Modal.style.ts | 9 +++++++++
src/components/common/Modal/index.tsx | 11 +++++++++++
2 files changed, 20 insertions(+)
create mode 100644 src/components/common/Modal/Modal.style.ts
create mode 100644 src/components/common/Modal/index.tsx
diff --git a/src/components/common/Modal/Modal.style.ts b/src/components/common/Modal/Modal.style.ts
new file mode 100644
index 00000000..14f1a341
--- /dev/null
+++ b/src/components/common/Modal/Modal.style.ts
@@ -0,0 +1,9 @@
+import styled from '@emotion/styled';
+
+export const Wrapper = styled.div`
+ display: flex;
+`;
+
+export const Contents = styled.div`
+ display: flex;
+`;
diff --git a/src/components/common/Modal/index.tsx b/src/components/common/Modal/index.tsx
new file mode 100644
index 00000000..ddfffa6f
--- /dev/null
+++ b/src/components/common/Modal/index.tsx
@@ -0,0 +1,11 @@
+import * as S from './Modal.style';
+
+function Modal() {
+ return (
+
+ 모달
+
+ );
+}
+
+export default Modal;
From 00f3628f7233290cefcf47beed70e7e7039bdc4d Mon Sep 17 00:00:00 2001
From: seoAreum <1971236@hansung.ac.kr>
Date: Sun, 14 Jan 2024 03:48:30 +0900
Subject: [PATCH 02/11] =?UTF-8?q?init:=20=EB=AA=A8=EB=8B=AC=20=EC=B4=88?=
=?UTF-8?q?=EA=B8=B0=EC=84=B8=ED=8C=85=20=EA=B5=AC=EC=B2=B4=ED=99=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CommonModal.style.ts} | 0
src/components/common/Modal/CommonModal/index.tsx | 11 +++++++++++
.../Modal/CommonModalForm/CommonModalForm.style.ts | 9 +++++++++
.../common/Modal/CommonModalForm/index.tsx | 11 +++++++++++
.../Modal/LoginCheckModal/LoginCheckModal.style.ts | 9 +++++++++
.../common/Modal/LoginCheckModal/index.tsx | 11 +++++++++++
.../LoginCheckModalForm/LoginCheckModalForm.style.ts | 9 +++++++++
.../common/Modal/LoginCheckModalForm/index.tsx | 11 +++++++++++
src/components/common/Modal/ModalPortal.tsx | 12 ++++++++++++
src/components/common/Modal/index.tsx | 11 -----------
10 files changed, 83 insertions(+), 11 deletions(-)
rename src/components/common/Modal/{Modal.style.ts => CommonModal/CommonModal.style.ts} (100%)
create mode 100644 src/components/common/Modal/CommonModal/index.tsx
create mode 100644 src/components/common/Modal/CommonModalForm/CommonModalForm.style.ts
create mode 100644 src/components/common/Modal/CommonModalForm/index.tsx
create mode 100644 src/components/common/Modal/LoginCheckModal/LoginCheckModal.style.ts
create mode 100644 src/components/common/Modal/LoginCheckModal/index.tsx
create mode 100644 src/components/common/Modal/LoginCheckModalForm/LoginCheckModalForm.style.ts
create mode 100644 src/components/common/Modal/LoginCheckModalForm/index.tsx
create mode 100644 src/components/common/Modal/ModalPortal.tsx
delete mode 100644 src/components/common/Modal/index.tsx
diff --git a/src/components/common/Modal/Modal.style.ts b/src/components/common/Modal/CommonModal/CommonModal.style.ts
similarity index 100%
rename from src/components/common/Modal/Modal.style.ts
rename to src/components/common/Modal/CommonModal/CommonModal.style.ts
diff --git a/src/components/common/Modal/CommonModal/index.tsx b/src/components/common/Modal/CommonModal/index.tsx
new file mode 100644
index 00000000..9621c1ca
--- /dev/null
+++ b/src/components/common/Modal/CommonModal/index.tsx
@@ -0,0 +1,11 @@
+import * as S from './CommonModal.style';
+
+function CommonModal() {
+ return (
+
+ CommonModal
+
+ );
+}
+
+export default CommonModal;
diff --git a/src/components/common/Modal/CommonModalForm/CommonModalForm.style.ts b/src/components/common/Modal/CommonModalForm/CommonModalForm.style.ts
new file mode 100644
index 00000000..05f161eb
--- /dev/null
+++ b/src/components/common/Modal/CommonModalForm/CommonModalForm.style.ts
@@ -0,0 +1,9 @@
+import styled from '@emotion/styled'
+
+export const Wrapper = styled.div`
+ display: flex;
+`;
+
+export const Contents = styled.div`
+ display: flex;
+`;
diff --git a/src/components/common/Modal/CommonModalForm/index.tsx b/src/components/common/Modal/CommonModalForm/index.tsx
new file mode 100644
index 00000000..0337c9ea
--- /dev/null
+++ b/src/components/common/Modal/CommonModalForm/index.tsx
@@ -0,0 +1,11 @@
+import * as S from './CommonModalForm.style';
+
+function CommonModalForm() {
+ return (
+
+ CommonModalForm
+
+ );
+}
+
+export default CommonModalForm;
diff --git a/src/components/common/Modal/LoginCheckModal/LoginCheckModal.style.ts b/src/components/common/Modal/LoginCheckModal/LoginCheckModal.style.ts
new file mode 100644
index 00000000..05f161eb
--- /dev/null
+++ b/src/components/common/Modal/LoginCheckModal/LoginCheckModal.style.ts
@@ -0,0 +1,9 @@
+import styled from '@emotion/styled'
+
+export const Wrapper = styled.div`
+ display: flex;
+`;
+
+export const Contents = styled.div`
+ display: flex;
+`;
diff --git a/src/components/common/Modal/LoginCheckModal/index.tsx b/src/components/common/Modal/LoginCheckModal/index.tsx
new file mode 100644
index 00000000..73eea101
--- /dev/null
+++ b/src/components/common/Modal/LoginCheckModal/index.tsx
@@ -0,0 +1,11 @@
+import * as S from './LoginCheckModal.style';
+
+function LoginCheckModal() {
+ return (
+
+ 모달
+
+ );
+}
+
+export default LoginCheckModal;
diff --git a/src/components/common/Modal/LoginCheckModalForm/LoginCheckModalForm.style.ts b/src/components/common/Modal/LoginCheckModalForm/LoginCheckModalForm.style.ts
new file mode 100644
index 00000000..14f1a341
--- /dev/null
+++ b/src/components/common/Modal/LoginCheckModalForm/LoginCheckModalForm.style.ts
@@ -0,0 +1,9 @@
+import styled from '@emotion/styled';
+
+export const Wrapper = styled.div`
+ display: flex;
+`;
+
+export const Contents = styled.div`
+ display: flex;
+`;
diff --git a/src/components/common/Modal/LoginCheckModalForm/index.tsx b/src/components/common/Modal/LoginCheckModalForm/index.tsx
new file mode 100644
index 00000000..da40ecab
--- /dev/null
+++ b/src/components/common/Modal/LoginCheckModalForm/index.tsx
@@ -0,0 +1,11 @@
+import * as S from './LoginCheckModalForm.style';
+
+function LoginCheckModalForm() {
+ return (
+
+ LoginCheckModalForm
+
+ );
+}
+
+export default LoginCheckModalForm;
diff --git a/src/components/common/Modal/ModalPortal.tsx b/src/components/common/Modal/ModalPortal.tsx
new file mode 100644
index 00000000..55dd8ba1
--- /dev/null
+++ b/src/components/common/Modal/ModalPortal.tsx
@@ -0,0 +1,12 @@
+import ReactDOM from 'react-dom';
+
+interface ModalPortalProps {
+ children: React.ReactNode;
+}
+
+const ModalPortal = ({ children }: ModalPortalProps) => {
+ const el: HTMLElement | null = document.getElementById('modal');
+ return ReactDOM.createPortal(children, el as Element | DocumentFragment);
+};
+
+export default ModalPortal;
diff --git a/src/components/common/Modal/index.tsx b/src/components/common/Modal/index.tsx
deleted file mode 100644
index ddfffa6f..00000000
--- a/src/components/common/Modal/index.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import * as S from './Modal.style';
-
-function Modal() {
- return (
-
- 모달
-
- );
-}
-
-export default Modal;
From 5c5929096942e7b90fe1d58ac91c050ca2d8e4cd Mon Sep 17 00:00:00 2001
From: seoAreum <1971236@hansung.ac.kr>
Date: Sun, 14 Jan 2024 05:01:43 +0900
Subject: [PATCH 03/11] =?UTF-8?q?style:=20asset=20=EC=B6=94=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/img/img_modal_ex.svg | 9 +++++++++
src/assets/index.ts | 5 +++--
2 files changed, 12 insertions(+), 2 deletions(-)
create mode 100644 src/assets/img/img_modal_ex.svg
diff --git a/src/assets/img/img_modal_ex.svg b/src/assets/img/img_modal_ex.svg
new file mode 100644
index 00000000..35a1efca
--- /dev/null
+++ b/src/assets/img/img_modal_ex.svg
@@ -0,0 +1,9 @@
+
diff --git a/src/assets/index.ts b/src/assets/index.ts
index f5968f3a..21e013ed 100644
--- a/src/assets/index.ts
+++ b/src/assets/index.ts
@@ -1,5 +1,4 @@
///
-
import BtnFloatingList from './button/btn_floating_list.svg?react';
import BtnFloatingPostit from './button/btn_floating_postit.svg?react';
import BtnFloatingSticker from './button/btn_floating_sticker.svg?react';
@@ -27,6 +26,7 @@ import ImgKakaoStarOrange from './img/img_kakao_star_orange.svg?react';
import ImgKakaoStarWhite from './img/img_kakao_star_white.svg?react';
import ImgLe from './img/img_le.svg?react';
import ImgLogoLecue from './img/img_logo_lecue.svg?react';
+import ImgModalEx from './img/img_modal_ex.svg?react';
import ImgSplashLogo from './img/img_splash_logo.svg?react';
import ImgStarOrangeLine from './img/img_star_orangeline.svg?react';
import ImgStarPosit from './img/img_star_postit.svg?react';
@@ -60,8 +60,9 @@ export {
ImgKakaoStarWhite,
ImgLe,
ImgLogoLecue,
+ ImgModalEx,
+ ImgSplashLogo,
ImgStarOrangeLine,
ImgStarPosit,
ImgSticker,
- ImgSplashLogo,
};
From c0cf8de7ffede01e4a1dc35cf30834929fb76759 Mon Sep 17 00:00:00 2001
From: seoAreum <1971236@hansung.ac.kr>
Date: Sun, 14 Jan 2024 05:03:07 +0900
Subject: [PATCH 04/11] =?UTF-8?q?chore:=20=ED=97=A4=EB=8D=94=20=ED=83=80?=
=?UTF-8?q?=EC=9D=B4=ED=8B=80=EB=AA=85=20=EB=B3=80=EA=B2=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/LecueNote/page/LeceuNotePage/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/LecueNote/page/LeceuNotePage/index.tsx b/src/LecueNote/page/LeceuNotePage/index.tsx
index ed6e4301..603f71a6 100644
--- a/src/LecueNote/page/LeceuNotePage/index.tsx
+++ b/src/LecueNote/page/LeceuNotePage/index.tsx
@@ -6,7 +6,7 @@ import * as S from './LecueNotePage.style';
function LecueNotePage() {
return (
-
+
From 9ca3a2296236b72460d6982ef6e087dcf4ece401 Mon Sep 17 00:00:00 2001
From: seoAreum <1971236@hansung.ac.kr>
Date: Sun, 14 Jan 2024 05:03:38 +0900
Subject: [PATCH 05/11] =?UTF-8?q?feat:=20=EA=B3=B5=ED=86=B5=EB=AA=A8?=
=?UTF-8?q?=EB=8B=AC=20=ED=81=B0=20=ED=8B=80=20=EA=B5=AC=ED=98=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CommonModalForm/CommonModalForm.style.ts | 79 ++++++++++++++++++-
.../common/Modal/CommonModalForm/index.tsx | 40 +++++++++-
2 files changed, 114 insertions(+), 5 deletions(-)
diff --git a/src/components/common/Modal/CommonModalForm/CommonModalForm.style.ts b/src/components/common/Modal/CommonModalForm/CommonModalForm.style.ts
index 05f161eb..081f8749 100644
--- a/src/components/common/Modal/CommonModalForm/CommonModalForm.style.ts
+++ b/src/components/common/Modal/CommonModalForm/CommonModalForm.style.ts
@@ -1,9 +1,82 @@
-import styled from '@emotion/styled'
+import { css } from '@emotion/react';
+import styled from '@emotion/styled';
-export const Wrapper = styled.div`
+export const Wrapper = styled.section`
display: flex;
+ justify-content: center;
+ align-items: center;
+ position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 9;
+
+ width: 100%;
+ height: 100vh;
+
+ background: ${({ theme }) => theme.colors.Modal};
+`;
+
+export const Contents = styled.article`
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+ z-index: 10;
+
+ margin: 17.4rem 4.4rem;
+
+ border-radius: 0.4rem;
+ background-color: ${({ theme }) => theme.colors.background};
+`;
+
+export const ImgWrapper = styled.div`
+ margin: 1.1rem;
+`;
+
+export const Title = styled.p`
+ margin-top: 0.2rem;
+ margin-bottom: 1.3rem;
+
+ color: ${({ theme }) => theme.colors.black};
+ ${({ theme }) => theme.fonts.Title1_SB_16};
`;
-export const Contents = styled.div`
+export const SubTitleWrapper = styled.div`
display: flex;
+ align-items: center;
+ flex-direction: column;
+
+ margin-bottom: 3.7rem;
+`;
+
+export const SubTitle = styled.p`
+ color: ${({ theme }) => theme.colors.key};
+ ${({ theme }) => theme.fonts.Body2_M_14};
+`;
+
+export const BtnWrapper = styled.div`
+ display: flex;
+ gap: 1rem;
+ justify-content: space-between;
+
+ width: calc(100% - 3rem);
+ margin: 0 1.5rem 1.4rem;
+`;
+
+export const Button = styled.button<{ variant: string }>`
+ width: 100%;
+ padding: 1.5rem 0;
+
+ border-radius: 0.4rem;
+ ${({ theme }) => theme.fonts.Title1_SB_16};
+ ${({ variant, theme }) =>
+ variant === 'stop'
+ ? css`
+ background-color: ${theme.colors.LG};
+ color: ${theme.colors.DG};
+ `
+ : css`
+ background-color: ${theme.colors.black};
+ color: ${theme.colors.white};
+ `};
`;
diff --git a/src/components/common/Modal/CommonModalForm/index.tsx b/src/components/common/Modal/CommonModalForm/index.tsx
index 0337c9ea..1399dd06 100644
--- a/src/components/common/Modal/CommonModalForm/index.tsx
+++ b/src/components/common/Modal/CommonModalForm/index.tsx
@@ -1,9 +1,45 @@
+import { ImgModalEx } from '../../../../assets';
import * as S from './CommonModalForm.style';
-function CommonModalForm() {
+interface CommonModalFormProps {
+ onClose: () => void;
+ title: string;
+ subTitle1: string;
+ subTitle2: string;
+ leftBtn: string;
+ rightBtn: string;
+}
+
+function CommonModalForm({
+ onClose,
+ title,
+ subTitle1,
+ subTitle2,
+ leftBtn,
+ rightBtn,
+}: CommonModalFormProps) {
return (
- CommonModalForm
+
+
+
+
+
+ {title}
+
+ {subTitle1}
+ {subTitle2}
+
+
+
+
+ {leftBtn}
+
+
+ {rightBtn}
+
+
+
);
}
From 86678080ba4d101bd3f646002a19f8594353e495 Mon Sep 17 00:00:00 2001
From: seoAreum <1971236@hansung.ac.kr>
Date: Sun, 14 Jan 2024 16:06:07 +0900
Subject: [PATCH 06/11] =?UTF-8?q?chore:=20=EC=B6=94=EC=83=81=ED=99=94?=
=?UTF-8?q?=EB=A5=BC=20=EC=9C=84=ED=95=9C=20=EC=83=81=EC=88=98=20=ED=8C=8C?=
=?UTF-8?q?=EC=9D=BC=20=EC=83=9D=EC=84=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../common/Modal/constants/ModalContents.tsx | 55 +++++++++++++++++++
1 file changed, 55 insertions(+)
create mode 100644 src/components/common/Modal/constants/ModalContents.tsx
diff --git a/src/components/common/Modal/constants/ModalContents.tsx b/src/components/common/Modal/constants/ModalContents.tsx
new file mode 100644
index 00000000..97103054
--- /dev/null
+++ b/src/components/common/Modal/constants/ModalContents.tsx
@@ -0,0 +1,55 @@
+import { ImgModalEx } from '../../../../assets';
+
+export const MODAL_CONTETNS = [
+ {
+ id: 'note_complete',
+ img: ,
+ title: '레큐노트 작성을 완료하셨나요?',
+ subTitle1: '완료 후 수정/삭제 할 수 없습니다.',
+ subTitle2: '신중하게 결정해주세요!',
+ leftBtn: '돌아가기',
+ rightBtn: '작성완료',
+ },
+ {
+ id: 'note_escape',
+ img: ,
+ title: '레큐노트 작성을 그만두시나요?',
+ subTitle1: '작성한 내용은 모두 사라집니다.',
+ subTitle2: '신중하게 결정해주세요!',
+ leftBtn: '그만두기',
+ rightBtn: '계속 작성',
+ },
+ {
+ id: 'book_escape',
+ img: ,
+ title: '레큐북 제작을 완료하셨나요?',
+ subTitle1: '작성한 내용은 모두 사라집니다.',
+ subTitle2: '신중하게 결정해주세요!',
+ leftBtn: '그만두기',
+ rightBtn: '계속 제작',
+ },
+ {
+ id: 'book_create',
+ img: ,
+ title: '레큐북을 제작할까요?',
+ subTitle1: '제작 후 수정/삭제할 수 없습니다.',
+ subTitle2: '신중하게 결정해주세요!',
+ leftBtn: '돌아가기',
+ rightBtn: '제작하기',
+ },
+ {
+ id: 'book_delete',
+ img: ,
+ title: '해당 레큐북을 삭제하시겠어요?',
+ subTitle1: '삭제 후 되돌릴 수 없습니다.',
+ subTitle2: '신중하게 결정해주세요!',
+ leftBtn: '돌아가기',
+ rightBtn: '삭제하기',
+ },
+ {
+ id: 'login',
+ img: ,
+ title: '로그인 후 이용해주세요',
+ rightBtn: '로그인하기',
+ },
+];
From d782a8d62778fff29564530fe123ea5b11a5abe4 Mon Sep 17 00:00:00 2001
From: seoAreum <1971236@hansung.ac.kr>
Date: Sun, 14 Jan 2024 16:07:20 +0900
Subject: [PATCH 07/11] =?UTF-8?q?feat:=20=EB=AA=A8=EB=8B=AC=ED=8F=BC=20?=
=?UTF-8?q?=EC=B6=94=EC=83=81=ED=99=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CommonModalForm/CommonModalForm.style.ts | 3 +-
.../common/Modal/CommonModalForm/index.tsx | 62 +++++++++++--------
2 files changed, 38 insertions(+), 27 deletions(-)
diff --git a/src/components/common/Modal/CommonModalForm/CommonModalForm.style.ts b/src/components/common/Modal/CommonModalForm/CommonModalForm.style.ts
index 081f8749..ab8d7439 100644
--- a/src/components/common/Modal/CommonModalForm/CommonModalForm.style.ts
+++ b/src/components/common/Modal/CommonModalForm/CommonModalForm.style.ts
@@ -11,14 +11,13 @@ export const Wrapper = styled.section`
z-index: 9;
width: 100%;
- height: 100vh;
+ height: 100dvh;
background: ${({ theme }) => theme.colors.Modal};
`;
export const Contents = styled.article`
display: flex;
- justify-content: center;
align-items: center;
flex-direction: column;
z-index: 10;
diff --git a/src/components/common/Modal/CommonModalForm/index.tsx b/src/components/common/Modal/CommonModalForm/index.tsx
index 1399dd06..2b5331fe 100644
--- a/src/components/common/Modal/CommonModalForm/index.tsx
+++ b/src/components/common/Modal/CommonModalForm/index.tsx
@@ -1,42 +1,54 @@
-import { ImgModalEx } from '../../../../assets';
+import { useEffect, useState } from 'react';
+
+import { MODAL_CONTETNS } from '../constants/ModalContents';
import * as S from './CommonModalForm.style';
interface CommonModalFormProps {
onClose: () => void;
- title: string;
- subTitle1: string;
- subTitle2: string;
- leftBtn: string;
- rightBtn: string;
+ category: string;
}
-function CommonModalForm({
- onClose,
- title,
- subTitle1,
- subTitle2,
- leftBtn,
- rightBtn,
-}: CommonModalFormProps) {
+function CommonModalForm({ onClose, category }: CommonModalFormProps) {
+ const [idx, setIdx] = useState(0);
+ useEffect(() => {
+ switch (category) {
+ case 'note_complete':
+ return setIdx(0);
+ case 'note_escape':
+ return setIdx(1);
+ case 'book_escape':
+ return setIdx(2);
+ case 'book_create':
+ return setIdx(3);
+ case 'book_delete':
+ return setIdx(4);
+ case 'login':
+ return setIdx(5);
+ default:
+ return;
+ }
+ }, []);
+
return (
-
-
-
+ {MODAL_CONTETNS[idx].img}
- {title}
+ {MODAL_CONTETNS[idx].title}
- {subTitle1}
- {subTitle2}
+ {MODAL_CONTETNS[idx].subTitle1}
+ {MODAL_CONTETNS[idx].subTitle2}
-
- {leftBtn}
-
-
- {rightBtn}
+ {idx !== 5 && (
+
+ {MODAL_CONTETNS[idx].leftBtn}
+
+ )}
+
+
+ {MODAL_CONTETNS[idx].rightBtn}
From 39696b333c5faa4d0e5adc8b1d54454b1bc2e041 Mon Sep 17 00:00:00 2001
From: seoAreum <1971236@hansung.ac.kr>
Date: Sun, 14 Jan 2024 16:11:49 +0900
Subject: [PATCH 08/11] =?UTF-8?q?feat:=20=EC=B6=94=EC=83=81=ED=99=94?=
=?UTF-8?q?=EB=90=9C=20=EB=AA=A8=EB=8B=AC=20=EA=B5=AC=ED=98=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../common/Modal/CommonModal/index.tsx | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/components/common/Modal/CommonModal/index.tsx b/src/components/common/Modal/CommonModal/index.tsx
index 9621c1ca..428bbea7 100644
--- a/src/components/common/Modal/CommonModal/index.tsx
+++ b/src/components/common/Modal/CommonModal/index.tsx
@@ -1,10 +1,16 @@
-import * as S from './CommonModal.style';
+import CommonModalForm from '../CommonModalForm';
+import ModalPortal from '../ModalPortal';
-function CommonModal() {
+interface CommonModal {
+ setModalOn: React.Dispatch>;
+ category: string;
+}
+
+function CommonModal({ setModalOn, category }: CommonModal) {
return (
-
- CommonModal
-
+
+ setModalOn(false)} category={category} />
+
);
}
From 4089e46c991f4549c3f8ffbc2bedfa734c75e9c9 Mon Sep 17 00:00:00 2001
From: seoAreum <1971236@hansung.ac.kr>
Date: Sun, 14 Jan 2024 16:12:21 +0900
Subject: [PATCH 09/11] =?UTF-8?q?feat:=20=EB=AA=A8=EB=8B=AC=ED=8F=AC?=
=?UTF-8?q?=ED=83=88=20=EC=83=9D=EC=84=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/common/Modal/ModalPortal.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/common/Modal/ModalPortal.tsx b/src/components/common/Modal/ModalPortal.tsx
index 55dd8ba1..8fe44c37 100644
--- a/src/components/common/Modal/ModalPortal.tsx
+++ b/src/components/common/Modal/ModalPortal.tsx
@@ -5,7 +5,7 @@ interface ModalPortalProps {
}
const ModalPortal = ({ children }: ModalPortalProps) => {
- const el: HTMLElement | null = document.getElementById('modal');
+ const el: HTMLElement | null = document.getElementById('lecuenote-modal');
return ReactDOM.createPortal(children, el as Element | DocumentFragment);
};
From ac73d8d19517aa3a5761cc8fd0990c054e028473 Mon Sep 17 00:00:00 2001
From: seoAreum <1971236@hansung.ac.kr>
Date: Sun, 14 Jan 2024 16:12:54 +0900
Subject: [PATCH 10/11] =?UTF-8?q?remove:=20=ED=95=84=EC=9A=94=EC=97=86?=
=?UTF-8?q?=EB=8A=94=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Modal/LoginCheckModal/LoginCheckModal.style.ts | 9 ---------
src/components/common/Modal/LoginCheckModal/index.tsx | 11 -----------
.../LoginCheckModalForm/LoginCheckModalForm.style.ts | 9 ---------
.../common/Modal/LoginCheckModalForm/index.tsx | 11 -----------
4 files changed, 40 deletions(-)
delete mode 100644 src/components/common/Modal/LoginCheckModal/LoginCheckModal.style.ts
delete mode 100644 src/components/common/Modal/LoginCheckModal/index.tsx
delete mode 100644 src/components/common/Modal/LoginCheckModalForm/LoginCheckModalForm.style.ts
delete mode 100644 src/components/common/Modal/LoginCheckModalForm/index.tsx
diff --git a/src/components/common/Modal/LoginCheckModal/LoginCheckModal.style.ts b/src/components/common/Modal/LoginCheckModal/LoginCheckModal.style.ts
deleted file mode 100644
index 05f161eb..00000000
--- a/src/components/common/Modal/LoginCheckModal/LoginCheckModal.style.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import styled from '@emotion/styled'
-
-export const Wrapper = styled.div`
- display: flex;
-`;
-
-export const Contents = styled.div`
- display: flex;
-`;
diff --git a/src/components/common/Modal/LoginCheckModal/index.tsx b/src/components/common/Modal/LoginCheckModal/index.tsx
deleted file mode 100644
index 73eea101..00000000
--- a/src/components/common/Modal/LoginCheckModal/index.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import * as S from './LoginCheckModal.style';
-
-function LoginCheckModal() {
- return (
-
- 모달
-
- );
-}
-
-export default LoginCheckModal;
diff --git a/src/components/common/Modal/LoginCheckModalForm/LoginCheckModalForm.style.ts b/src/components/common/Modal/LoginCheckModalForm/LoginCheckModalForm.style.ts
deleted file mode 100644
index 14f1a341..00000000
--- a/src/components/common/Modal/LoginCheckModalForm/LoginCheckModalForm.style.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import styled from '@emotion/styled';
-
-export const Wrapper = styled.div`
- display: flex;
-`;
-
-export const Contents = styled.div`
- display: flex;
-`;
diff --git a/src/components/common/Modal/LoginCheckModalForm/index.tsx b/src/components/common/Modal/LoginCheckModalForm/index.tsx
deleted file mode 100644
index da40ecab..00000000
--- a/src/components/common/Modal/LoginCheckModalForm/index.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import * as S from './LoginCheckModalForm.style';
-
-function LoginCheckModalForm() {
- return (
-
- LoginCheckModalForm
-
- );
-}
-
-export default LoginCheckModalForm;
From 581826ef2c64dce4188f17cb1a84cca3f373c1d1 Mon Sep 17 00:00:00 2001
From: seoAreum <1971236@hansung.ac.kr>
Date: Sun, 14 Jan 2024 16:23:03 +0900
Subject: [PATCH 11/11] =?UTF-8?q?chore:=20=ED=8C=8C=EC=9D=BC=20=EC=9D=B4?=
=?UTF-8?q?=EB=8F=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Modal/{CommonModal/index.tsx => CommonModal.tsx} | 4 ++--
.../common/Modal/CommonModal/CommonModal.style.ts | 9 ---------
2 files changed, 2 insertions(+), 11 deletions(-)
rename src/components/common/Modal/{CommonModal/index.tsx => CommonModal.tsx} (78%)
delete mode 100644 src/components/common/Modal/CommonModal/CommonModal.style.ts
diff --git a/src/components/common/Modal/CommonModal/index.tsx b/src/components/common/Modal/CommonModal.tsx
similarity index 78%
rename from src/components/common/Modal/CommonModal/index.tsx
rename to src/components/common/Modal/CommonModal.tsx
index 428bbea7..bd5f9ea3 100644
--- a/src/components/common/Modal/CommonModal/index.tsx
+++ b/src/components/common/Modal/CommonModal.tsx
@@ -1,5 +1,5 @@
-import CommonModalForm from '../CommonModalForm';
-import ModalPortal from '../ModalPortal';
+import CommonModalForm from './CommonModalForm';
+import ModalPortal from './ModalPortal';
interface CommonModal {
setModalOn: React.Dispatch>;
diff --git a/src/components/common/Modal/CommonModal/CommonModal.style.ts b/src/components/common/Modal/CommonModal/CommonModal.style.ts
deleted file mode 100644
index 14f1a341..00000000
--- a/src/components/common/Modal/CommonModal/CommonModal.style.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import styled from '@emotion/styled';
-
-export const Wrapper = styled.div`
- display: flex;
-`;
-
-export const Contents = styled.div`
- display: flex;
-`;