From 7724239982c9ab37c3749aa0087f49f5cf81c88b Mon Sep 17 00:00:00 2001 From: Hyunjin Date: Sat, 17 Jul 2021 12:33:49 +0900 Subject: [PATCH 1/5] =?UTF-8?q?Fix:=20=ED=8D=BC=EB=B8=94=EB=A6=AC=EC=8B=B1?= =?UTF-8?q?=20(#54)=20(#55)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix: 전반적인 퍼블리싱 수정 * fix: loginform --- .../molecules/CategoryButton/index.tsx | 4 +- .../molecules/ChallengeRegister/index.tsx | 83 +++++++++++-------- .../molecules/HamDropDown/index.tsx | 17 +++- .../molecules/RegisterHeader/index.tsx | 29 +++---- src/components/organisms/Hamburger/index.tsx | 16 ++++ src/components/organisms/Login/index.tsx | 9 +- 6 files changed, 103 insertions(+), 55 deletions(-) diff --git a/src/components/molecules/CategoryButton/index.tsx b/src/components/molecules/CategoryButton/index.tsx index ea69d0a5..991a5f7d 100644 --- a/src/components/molecules/CategoryButton/index.tsx +++ b/src/components/molecules/CategoryButton/index.tsx @@ -31,11 +31,11 @@ function CategoryButton({ tag, isMore, selectedCategory, onClickInterest }: IPro const SCategoryButton = Styled.label` height: 46px; border-radius: 60px; - padding: 12px 25px; + padding: 12px 30px; margin-right: 10px; background-color:${({ isCategoryClicked }) => (isCategoryClicked ? '#03b6ce' : '#ffffff')}; border: ${({ isCategoryClicked }) => - isCategoryClicked ? '#03b6ce' : ({ readMore }) => (readMore ? '1px solid #8b8b8b' : '1px solid #03b6ce')}; + isCategoryClicked ? '1px solid #03b6ce' : ({ readMore }) => (readMore ? '1px solid #8b8b8b' : '1px solid #03b6ce')}; .button { white-space : nowrap; font-size: 16px; diff --git a/src/components/molecules/ChallengeRegister/index.tsx b/src/components/molecules/ChallengeRegister/index.tsx index 8a43923a..d738d49d 100644 --- a/src/components/molecules/ChallengeRegister/index.tsx +++ b/src/components/molecules/ChallengeRegister/index.tsx @@ -96,32 +96,34 @@ const ChallengeRegister = (): React.ReactElement => {
{datetoString(periodData.challengeStartDT)} ~ {datetoString(periodData.challengeEndDT)}
-
-
챌린지 개수 설정
-
2개 이상부터 뱃지 획득 가능
-
-
+
+
+
챌린지 개수 설정
+

2개 이상부터 뱃지 획득 가능

+
- +
{registerCount} - +
-
-
+
주의사항
@@ -289,6 +299,7 @@ const SRegister = Styled.div` font-size: 14px; &__minus-plus{ + cursor: pointer; border:none; background-color: #FFFFFF; } @@ -303,12 +314,16 @@ const SRegister = Styled.div` &__box{ display:inline-block; float:right; - border: 1px solid #DFDFDF; + border: solid 1px #dfdfdf; border-radius: 4px; - padding-top:5px; width: 119px; height: 36px; - line-height: 1.25; + margin-top: 60px; + padding: 0 16px; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; font-family: HomepageBaukasten; font-size: 16px; font-weight: bold; @@ -340,21 +355,13 @@ const SRegister = Styled.div` font-size: 14px; } &__notice{ - font-family: Apple SD Gothic Neo; - font-style: normal; - font-weight: normal; - font-size: 12px; - line-height: 18px; - /* identical to box height, or 150% */ - - display: flex; - align-items: center; - text-align: center; - letter-spacing: -0.5px; - - /* LightGray2 */ - - color: #C1C1C1; + width: 126px; + height: 18px; + line-height: 1.5; + letter-spacing: -0.5px; + color: #c1c1c1; + font-family: AppleSDGothicNeo; + font-size: 12px; } } .card{ @@ -466,10 +473,14 @@ const SRegister = Styled.div` background: linear-gradient(91.91deg, #36C8F5 7.34%, #13E2DD 90.35%); width:500px; height:64px; - + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; } .modal__img{ display:inline-block; + margin-right: 10px; } .modal__register-button{ display:inline-block; @@ -515,17 +526,17 @@ const SRegister = Styled.div` } &__icon{ - display:inline-block; - padding-top:50px; + /* display:inline-block; + padding-top:50px; */ + margin-right: 8px; } &__caution{ - display:inline-block; - padding-top:50px; + /* display:inline-block; + padding-top:50px; */ text-align: center; - line-height: 1.5; letter-spacing: -0.5px; - color: var(--colors-grayscale-3-d-dark-gray); + color: #3d3d3d; font-family: AppleSDGothicNeo; font-size: 14px; diff --git a/src/components/molecules/HamDropDown/index.tsx b/src/components/molecules/HamDropDown/index.tsx index ac4fe1ca..a25f4324 100644 --- a/src/components/molecules/HamDropDown/index.tsx +++ b/src/components/molecules/HamDropDown/index.tsx @@ -97,7 +97,22 @@ const SHamDropDown = Styled.div<{ isOpened?: boolean; isEnglish: boolean }>` display : flex; flex-direction : column; max-height : 229px; - overflow: scroll; + overflow-y: scroll; + ::-webkit-scrollbar { + width: 0.8rem; + } + ::-webkit-scrollbar-track { + background: none; + } + ::-webkit-scrollbar-thumb { + background: #c1c1c1; + border-radius: 0.5rem; + box-sizing: border-box; + } + /* Handle on hover */ + ::-webkit-scrollbar-thumb:hover { + background: #c1c1c1; + } align-items : center; } &__btn{ diff --git a/src/components/molecules/RegisterHeader/index.tsx b/src/components/molecules/RegisterHeader/index.tsx index 60660a52..8cd99bb6 100644 --- a/src/components/molecules/RegisterHeader/index.tsx +++ b/src/components/molecules/RegisterHeader/index.tsx @@ -6,6 +6,9 @@ interface IProps { title: string; img: string; } +interface ISHeader { + url?: string; +} const indextoName = (index: number) => { switch (index) { case 1: @@ -21,34 +24,32 @@ const indextoName = (index: number) => { const RegisterHeader = ({ generation, title, img }: IProps) => { return ( - +
- - Learn Myself {indextoName(generation)} 모집 +
+
+ {title} {indextoName(generation)} 모집 +
+
); }; -const SHeader = Styled.div` +const SHeader = Styled.div` .header{ &__img{ width: 100%; height:253px; position:relative; - + background: url(${(props) => props.url}) center center / cover; + display: flex; + align-items: center; + justify-content: center; } &__text{ - position: absolute; - top:50%; - left:50%; - color: white; - z-index: 2; - text-align: center; - top:0; - padding-top:300px; - transform: translate(-50%, -50%); + color: white; font-family: AppleSDGothicNeo; font-size: 48px; } diff --git a/src/components/organisms/Hamburger/index.tsx b/src/components/organisms/Hamburger/index.tsx index c2fb6fcb..35c5892e 100644 --- a/src/components/organisms/Hamburger/index.tsx +++ b/src/components/organisms/Hamburger/index.tsx @@ -338,6 +338,22 @@ const HamburgerWrap = Styled.div` align-items : center; padding-top : 70px; overflow : scroll; + ::-webkit-scrollbar { + width: 0.8rem; + height: 1rem; + } + ::-webkit-scrollbar-track { + background: none; + } + ::-webkit-scrollbar-thumb { + background: #c1c1c1; + border-radius: 0.5rem; + box-sizing: border-box; + } + /* Handle on hover */ + ::-webkit-scrollbar-thumb:hover { + background: #c1c1c1; + } &__button{ &--title{ margin : 10px 0; diff --git a/src/components/organisms/Login/index.tsx b/src/components/organisms/Login/index.tsx index c389e72b..0e4dd883 100644 --- a/src/components/organisms/Login/index.tsx +++ b/src/components/organisms/Login/index.tsx @@ -25,11 +25,14 @@ function CLogin(): React.ReactElement { } const LoginWrap = Styled.div` + position: relative; + top: -60px; + width: 100%; + height: 100vh; display : flex; flex-direction : column; align-items : center; - margin-top : 230px; - margin-bottom : 250px; + justify-content: center; .login{ &__label{ font-size: 40px; @@ -54,6 +57,7 @@ const LoginWrap = Styled.div` line-height : 1.5; color : #8b8b8b; margin-right : 15px; + font-family: AppleSDGothicNeo; } &__rightbtn{ font-size : 16px; @@ -61,6 +65,7 @@ const LoginWrap = Styled.div` line-height : 1.5; color : #8b8b8b; margin-left : 15px; + font-family: AppleSDGothicNeo; } } `; From 0bd14eb6d64c99c66e8b38ccf8bcf6b6875d60ca Mon Sep 17 00:00:00 2001 From: Subin Date: Sat, 17 Jul 2021 15:21:40 +0900 Subject: [PATCH 2/5] =?UTF-8?q?Fix:=20=EA=B0=80=EC=9E=85=EC=8B=9C=20?= =?UTF-8?q?=EA=B4=80=EC=8B=AC=EB=B6=84=EC=95=BC=20=EB=AF=B8=EC=A0=84?= =?UTF-8?q?=EC=86=A1=20=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/organisms/Join/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/organisms/Join/index.tsx b/src/components/organisms/Join/index.tsx index 91904e51..08abfc3d 100644 --- a/src/components/organisms/Join/index.tsx +++ b/src/components/organisms/Join/index.tsx @@ -58,7 +58,6 @@ function CJoin(): React.ReactElement { }; const modalBtnHandler = async () => { //여기서 api호출!! - setUserData({ ...userData, interest: selectedInterest }); const postData = { email: userData.email, password: userData.password, @@ -81,6 +80,9 @@ function CJoin(): React.ReactElement { const joinBtnHandler = () => { setIsInterestModalOpen(true); }; + useEffect(() => { + setUserData({ ...userData, interest: selectedInterest }); + }, [selectedInterest]); useEffect(() => { if ( From 96f8e4afc07dad819daa9ec61a61e8e9dce505fb Mon Sep 17 00:00:00 2001 From: Subin Date: Sat, 17 Jul 2021 15:27:35 +0900 Subject: [PATCH 3/5] =?UTF-8?q?Fix:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=ED=9B=84?= =?UTF-8?q?=20=ED=95=84=ED=84=B0=EB=A7=81=EC=8B=9C=20isMine=20=EB=94=94?= =?UTF-8?q?=ED=8F=B4=ED=8A=B8=20=EA=B0=92=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/molecules/ChallengeHeader.tsx/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/molecules/ChallengeHeader.tsx/index.tsx b/src/components/molecules/ChallengeHeader.tsx/index.tsx index de77dc9b..1c02f73b 100644 --- a/src/components/molecules/ChallengeHeader.tsx/index.tsx +++ b/src/components/molecules/ChallengeHeader.tsx/index.tsx @@ -55,7 +55,7 @@ function ChallengeHeader({ const [selectedCategory, setSelectedCategory] = useState('전체'); const [keyword, setKeyword] = useState(''); const [booleanMine, setBooleanMine] = useState(false); - const [ismine, setIsmine] = useState(1); + const [ismine, setIsmine] = useState(0); const [userStateNum, setUserState] = useState(userStatusData ? userStatusData.userType : 0); const getChallengeCategoryData = useCallback( From c946109a60455771a3831b26f40366d50a26bf61 Mon Sep 17 00:00:00 2001 From: Subin Date: Sat, 17 Jul 2021 15:38:41 +0900 Subject: [PATCH 4/5] =?UTF-8?q?Fix:=20=EC=8A=A4=ED=81=AC=EB=9E=A9=20?= =?UTF-8?q?=EB=A0=8C=EB=8D=94=EB=A7=81=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../molecules/ViewListCard/index.tsx | 13 +++++++++--- src/libs/getChallenge.ts | 21 +++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/components/molecules/ViewListCard/index.tsx b/src/components/molecules/ViewListCard/index.tsx index 759bb9a3..c4c3431c 100644 --- a/src/components/molecules/ViewListCard/index.tsx +++ b/src/components/molecules/ViewListCard/index.tsx @@ -98,6 +98,7 @@ function ViewListCard({ const [userStateNickname, setUserStateNickname] = useState(userData ? userData.nickname : 0); const [isMine, setIsMine] = useState(false); const [likeRender, setLikeRender] = useState(isLike); + const [scrapRender, setScrapRender] = useState(isScrap); const getCommentList = useCallback(async () => { if (userStatusData) { @@ -152,14 +153,20 @@ function ViewListCard({ const submitScarp = async () => { if (userStatusData) { const token = userStatusData.token; - await ChallengeScrap(token, id); + const submitSuccess = await ChallengeScrap(token, id); + if (submitSuccess) { + setScrapRender(true); + } } }; const cancelScrap = async () => { if (userStatusData) { const token = userStatusData.token; - await CancelChallengeScrap(token, id); + const cancelSuccess = await CancelChallengeScrap(token, id); + if (cancelSuccess) { + setScrapRender(false); + } } }; @@ -184,7 +191,7 @@ function ViewListCard({

{dayjs(createdAt).format('MM.DD')}

{userStateNum === 0 || userStateNum === 1 || userStateNum === 2 || isMine === false ? ( - isScrap === false ? ( + scrapRender === false ? (