Skip to content

Commit

Permalink
Fix: qa (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
seobbang authored Oct 4, 2024
1 parent e41100e commit fdf9fbe
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/components/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ const backgroundCss = css`
const containerCss = (height: string) => css`
position: absolute;
bottom: 0;
overflow: auto;
width: 100dvw;
height: ${height};
Expand Down
2 changes: 0 additions & 2 deletions src/views/Detail/components/Review.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const Review = () => {

const handleSetShowGuide = (value: boolean) => {
setShowGuide(value);
document.body.style.overflow = '';
};

const handleFilterState = (category: category, facility: string) => {
Expand All @@ -71,7 +70,6 @@ const Review = () => {
const selectedFilterList = getFilterList(filterState);

useEffect(() => {
if (showGuide) document.body.style.overflow = 'hidden';
if (sessionStorage.getItem(STORAGE_KEY.successToast)) {
setToast(true);
sessionStorage.removeItem(STORAGE_KEY.successToast);
Expand Down
8 changes: 7 additions & 1 deletion src/views/Detail/components/review/CategoryBottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const CategoryBottomSheet = (props: CategoryBottomSheetProps) => {
<header css={titleCss}>
<h3>리뷰 필터</h3>
</header>
<ul>
<ul css={listContainerCss}>
{['physical', 'visual', 'hearing', 'infant'].map((category) => (
<CategoryList
key={category}
Expand All @@ -65,3 +65,9 @@ const titleCss = css`
color: ${COLORS.brand1};
${FONTS.H4};
`;

const listContainerCss = css`
overflow: auto;
height: calc(100% - 4rem);
`;
15 changes: 14 additions & 1 deletion src/views/Detail/components/review/Guide.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { css } from '@emotion/react';
import { useEffect } from 'react';

import { CheckFillIcon, XMonoIcon } from '@/assets/icon';
import { COLORS, FONTS } from '@/styles/constants';
Expand All @@ -16,15 +17,27 @@ const Guide = (props: GuideProps) => {
const hideGuideForADay = () => {
setStorageHideGuide(STORAGE_KEY.hideReviewFilterGuide);
handleSetShowGuide(false);
document.body.style.overflow = 'auto';
};

useEffect(() => {
document.body.style.overflow = 'hidden';

return () => {
document.body.style.overflow = 'auto';
};
});

return (
<div css={containerCss}>
<div css={section1Css}>
<button
type="button"
css={buttonCss}
onClick={() => handleSetShowGuide(false)}>
onClick={() => {
handleSetShowGuide(false);
document.body.style.overflow = 'auto';
}}>
<XMonoIcon />
</button>
<p css={textCss}>
Expand Down
1 change: 1 addition & 0 deletions src/views/Map/components/BottomSheetContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const BottomSheetContent = (props: contentProps) => {

const onClickContent = () => {
navigate(`/${contentId}`);
document.body.style.overflow = 'auto';
};

return (
Expand Down
8 changes: 7 additions & 1 deletion src/views/Search/components/Search/FilterBottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const FilterBottomSheet = (props: FilterBottomSheetProps) => {
<header css={titleCss}>
<h3>필터 상세 설정</h3>
</header>
<ul>
<ul css={listContainerCss}>
<FacilitiesAccordian
category={'physical'}
filterState={selectedFilterState}
Expand Down Expand Up @@ -83,3 +83,9 @@ const titleCss = css`
const lineCss = css`
border-top: 1px solid rgb(241 241 241 / 100%);
`;

const listContainerCss = css`
overflow: auto;
height: calc(100% - 4rem);
`;

0 comments on commit fdf9fbe

Please sign in to comment.