From bcf8c5428a7ee2122c3f74d2a33c98282904bb15 Mon Sep 17 00:00:00 2001 From: Jihyun Kim <ksk208105@gmail.com> Date: Tue, 8 Oct 2024 21:02:25 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[FE]=20FIX:=20=EB=A1=9C=EB=94=A9=20?= =?UTF-8?q?=EC=95=A0=EB=8B=88=EB=A9=94=EC=9D=B4=EC=85=98=20=EC=9E=91?= =?UTF-8?q?=EB=8F=99=20=EC=8B=9C,=20=EC=8A=A4=ED=81=AC=EB=A1=A4=EB=B0=94?= =?UTF-8?q?=20=EC=A0=9C=EA=B1=B0=ED=95=98=EA=B8=B0=20=EC=9C=84=ED=95=9C=20?= =?UTF-8?q?css=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/components/Common/LoadingAnimation.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx b/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx index f0b636b88..c458265fc 100644 --- a/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx +++ b/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx @@ -13,6 +13,7 @@ const LoadingAnimationWrapperStyled = styled.div` width: 100%; height: 100%; display: flex; + overflow-y: hidden; justify-content: center; align-items: center; `; From 1b0744818a5a045c7f6fd76433dee6129d90f004 Mon Sep 17 00:00:00 2001 From: Jihyun Kim <ksk208105@gmail.com> Date: Tue, 8 Oct 2024 21:27:40 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[FE]=20FIX:=20=EC=83=88=EB=A1=9C=EA=B3=A0?= =?UTF-8?q?=EC=B9=A8=20=EC=8B=9C=20=EB=82=98=ED=83=80=EB=82=98=EB=8A=94=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A1=A4=EB=B0=94=20=EC=A0=9C=EA=B1=B0?= =?UTF-8?q?=ED=95=98=EA=B8=B0=20=EC=9C=84=ED=95=9C=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/pages/MainPage.tsx | 119 +++++++++--------- .../src/Cabinet/pages/admin/AdminMainPage.tsx | 73 ++++++----- 2 files changed, 95 insertions(+), 97 deletions(-) diff --git a/frontend/src/Cabinet/pages/MainPage.tsx b/frontend/src/Cabinet/pages/MainPage.tsx index dc73bc107..506e99c1f 100644 --- a/frontend/src/Cabinet/pages/MainPage.tsx +++ b/frontend/src/Cabinet/pages/MainPage.tsx @@ -123,66 +123,65 @@ const MainPage = () => { setIsCurrentSectionRender(false); }; - return ( - <> - {isLoading && <LoadingAnimation />} - <WrapperStyled - ref={mainWrapperRef} - onTouchStart={(e: React.TouchEvent) => { - touchStartPosX.current = e.changedTouches[0].screenX; - touchStartPosY.current = e.changedTouches[0].screenY; - }} - onTouchEnd={(e: React.TouchEvent) => { - swipeSection( - e.changedTouches[0].screenX, - e.changedTouches[0].screenY - ); - }} - > - <AlertStyled> - {currentFloorSectionNames.includes(currentSectionName) && - !isClubSection && ( - <IconWrapperStyled - onClick={handleAlertIconBtn} - disabled={ - sectionList[currentSectionIndex]?.alarmRegistered - ? true - : false - } - > - {sectionList[currentSectionIndex]?.alarmRegistered === true ? ( - <FilledHeartIcon /> - ) : ( - <LineHeartIcon /> - )} - </IconWrapperStyled> - )} - </AlertStyled> - <SectionPaginationContainer /> - <CabinetListWrapperStyled> - <CabinetListContainer isAdmin={false} /> - {currentSectionName !== SectionType.elevator && - currentSectionName !== SectionType.stairs && ( - <RefreshButtonStyled - className="cabiButton" - title="새로고침" - id="refreshButton" - onClick={refreshCabinetList} - > - 새로고침 - </RefreshButtonStyled> - )} - </CabinetListWrapperStyled> - {showSectionAlertModal && ( - <SectionAlertModal - currentSectionName={currentSectionName} - setShowSectionAlertModal={setShowSectionAlertModal} - currentBuilding={currentBuilding} - currentFloor={currentFloor} - /> - )} - </WrapperStyled> - </> + return isLoading ? ( + <LoadingAnimation /> + ) : ( + <WrapperStyled + ref={mainWrapperRef} + onTouchStart={(e: React.TouchEvent) => { + touchStartPosX.current = e.changedTouches[0].screenX; + touchStartPosY.current = e.changedTouches[0].screenY; + }} + onTouchEnd={(e: React.TouchEvent) => { + swipeSection( + e.changedTouches[0].screenX, + e.changedTouches[0].screenY + ); + }} + > + <AlertStyled> + {currentFloorSectionNames.includes(currentSectionName) && + !isClubSection && ( + <IconWrapperStyled + onClick={handleAlertIconBtn} + disabled={ + sectionList[currentSectionIndex]?.alarmRegistered + ? true + : false + } + > + {sectionList[currentSectionIndex]?.alarmRegistered === true ? ( + <FilledHeartIcon /> + ) : ( + <LineHeartIcon /> + )} + </IconWrapperStyled> + )} + </AlertStyled> + <SectionPaginationContainer /> + <CabinetListWrapperStyled> + <CabinetListContainer isAdmin={false} /> + {currentSectionName !== SectionType.elevator && + currentSectionName !== SectionType.stairs && ( + <RefreshButtonStyled + className="cabiButton" + title="새로고침" + id="refreshButton" + onClick={refreshCabinetList} + > + 새로고침 + </RefreshButtonStyled> + )} + </CabinetListWrapperStyled> + {showSectionAlertModal && ( + <SectionAlertModal + currentSectionName={currentSectionName} + setShowSectionAlertModal={setShowSectionAlertModal} + currentBuilding={currentBuilding} + currentFloor={currentFloor} + /> + )} + </WrapperStyled> ); }; diff --git a/frontend/src/Cabinet/pages/admin/AdminMainPage.tsx b/frontend/src/Cabinet/pages/admin/AdminMainPage.tsx index de410c157..adc495cb1 100644 --- a/frontend/src/Cabinet/pages/admin/AdminMainPage.tsx +++ b/frontend/src/Cabinet/pages/admin/AdminMainPage.tsx @@ -93,44 +93,43 @@ const AdminMainPage = () => { else moveToRightSection(); }; - return ( - <> - {isLoading && <LoadingAnimation />} - <WrapperStyled - ref={mainWrapperRef} - onTouchStart={(e: React.TouchEvent) => { - touchStartPosX.current = e.changedTouches[0].screenX; - touchStartPosY.current = e.changedTouches[0].screenY; - }} - onTouchEnd={(e: React.TouchEvent) => { - swipeSection( - e.changedTouches[0].screenX, - e.changedTouches[0].screenY - ); - }} - > - <SectionPaginationContainer /> - <MultiSelectButtonWrapperStyled isMultiSelect={isMultiSelect}> - <MultiSelectButton - theme={isMultiSelect ? "fill" : "line"} - text="다중 선택 모드" - onClick={toggleMultiSelectMode} - /> - </MultiSelectButtonWrapperStyled> - <CabinetListWrapperStyled> - <CabinetListContainer isAdmin={true} /> + return isLoading ? ( + <LoadingAnimation /> + ) : ( + <WrapperStyled + ref={mainWrapperRef} + onTouchStart={(e: React.TouchEvent) => { + touchStartPosX.current = e.changedTouches[0].screenX; + touchStartPosY.current = e.changedTouches[0].screenY; + }} + onTouchEnd={(e: React.TouchEvent) => { + swipeSection( + e.changedTouches[0].screenX, + e.changedTouches[0].screenY + ); + }} + > + <SectionPaginationContainer /> + <MultiSelectButtonWrapperStyled isMultiSelect={isMultiSelect}> + <MultiSelectButton + theme={isMultiSelect ? "fill" : "line"} + text="다중 선택 모드" + onClick={toggleMultiSelectMode} + /> + </MultiSelectButtonWrapperStyled> + <CabinetListWrapperStyled> + <CabinetListContainer isAdmin={true} /> - <RefreshButtonStyled - className="cabiButton" - title="새로고침" - id="refreshButton" - onClick={refreshCabinetList} - > - 새로고침 - </RefreshButtonStyled> - </CabinetListWrapperStyled> - </WrapperStyled> - </> + <RefreshButtonStyled + className="cabiButton" + title="새로고침" + id="refreshButton" + onClick={refreshCabinetList} + > + 새로고침 + </RefreshButtonStyled> + </CabinetListWrapperStyled> + </WrapperStyled> ); }; From 08660f1b765a2e62e1424b3855527d1f5aafbd36 Mon Sep 17 00:00:00 2001 From: Jihyun Kim <ksk208105@gmail.com> Date: Thu, 10 Oct 2024 14:44:52 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[FE]=20REFACTOR:=20=ED=95=84=EC=9A=94?= =?UTF-8?q?=EC=97=86=EB=8A=94=20css=20=EC=86=8D=EC=84=B1=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/components/Common/LoadingAnimation.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx b/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx index c458265fc..f0b636b88 100644 --- a/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx +++ b/frontend/src/Cabinet/components/Common/LoadingAnimation.tsx @@ -13,7 +13,6 @@ const LoadingAnimationWrapperStyled = styled.div` width: 100%; height: 100%; display: flex; - overflow-y: hidden; justify-content: center; align-items: center; `;