Skip to content

Commit

Permalink
refactor: 의도치 않은 레이아웃 변경 방지
Browse files Browse the repository at this point in the history
  • Loading branch information
Songhyejeong committed Dec 11, 2024
1 parent 01c60cc commit d6ebcd2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/components/main/cateogryAndMap/CategoryAndMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default CategoryAndMap;
const CategoryAndMapLayout = styled.div`
width: 80%;
max-width: 1120px;
min-height: 1140px;
display: flex;
flex-direction: column;
justify-content: center;
Expand Down
8 changes: 2 additions & 6 deletions src/components/main/contents/TopRecommendations.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import MainContentsWrap from '../slider/MainContentsWrap';

const TopRecommendations = () => {
const [topStores, setTopStores] = useState([]);
const [isLoading, setIsLoading] = useState(false);

const fetchTopStores = async () => {
setIsLoading(true);
try {
const response = await getTopStores();
if (response.status === 200) {
Expand All @@ -16,8 +14,6 @@ const TopRecommendations = () => {
}
} catch (error) {
console.log(error);
} finally {
setIsLoading(false);
}
};

Expand All @@ -26,14 +22,14 @@ const TopRecommendations = () => {
}, []);

return (
!isLoading && (
<div style={{ minHeight: '500px' }}>
<MainContentsWrap
ranking={true}
title="맛 알고리즘이 엄선한 TOP 10"
description="맛알고리즘에서 긍정키워드로 분석한 맛집 컬렉션 10"
stores={topStores}
/>
)
</div>
);
};

Expand Down
4 changes: 2 additions & 2 deletions src/components/main/slider/MainContentsWrap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default MainContentsWrap;

const MainContentsWrapLayout = styled.div`
width: 100%;
height: 500px;
display: flex;
flex-direction: column;
gap: 10px;
Expand Down Expand Up @@ -98,8 +99,7 @@ const SlideContainer = styled.div`
@media screen and (max-width: 768px) {
width: 100%;
gap: 20px;
gap: 5px;
.slick-dots li button::before {
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/storeCard/StoreCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ const StoreCardContainer = styled.div`
@media screen and (max-width: 500px) {
width: fit-content;
max-width: 280px;
margin: 5px;
height: 350px;
margin: 0;
}
`;

Expand Down

0 comments on commit d6ebcd2

Please sign in to comment.