diff --git a/frontend/src/components/Common/Carousel/Carousel.tsx b/frontend/src/components/Common/Carousel/Carousel.tsx
index 4fa1839f4..5f7c3ad23 100644
--- a/frontend/src/components/Common/Carousel/Carousel.tsx
+++ b/frontend/src/components/Common/Carousel/Carousel.tsx
@@ -7,12 +7,12 @@ interface CarouselProps {
carouselList: CarouselChildren[];
}
-const CAROUSEL_WIDTH = window.innerWidth;
-
const Carousel = ({ carouselList }: CarouselProps) => {
const extendedCarouselList = [...carouselList, carouselList[0]];
const [currentIndex, setCurrentIndex] = useState(0);
+ const CAROUSEL_WIDTH = window.innerWidth;
+
const showNextSlide = () => {
setCurrentIndex((prev) => (prev === carouselList.length ? 0 : prev + 1));
};
@@ -25,9 +25,16 @@ const Carousel = ({ carouselList }: CarouselProps) => {
return (
-
+
{extendedCarouselList.map(({ id, children }) => (
- {children}
+
+ {children}
+
))}
@@ -44,13 +51,10 @@ const CarouselContainer = styled.div`
overflow: hidden;
`;
-const CarouselWrapper = styled.ul<{ currentIndex: number }>`
+const CarouselWrapper = styled.ul`
display: flex;
- transform: ${({ currentIndex }) => 'translateX(-' + currentIndex * CAROUSEL_WIDTH + 'px)'};
- transition: ${({ currentIndex }) => (currentIndex === length - 1 ? '' : 'all 0.5s ease-in-out')};
`;
const CarouselItem = styled.li`
- width: ${CAROUSEL_WIDTH}px;
height: fit-content;
`;
diff --git a/frontend/src/components/Common/CategoryItem/CategoryItem.tsx b/frontend/src/components/Common/CategoryItem/CategoryItem.tsx
index a16889758..4ce54ce72 100644
--- a/frontend/src/components/Common/CategoryItem/CategoryItem.tsx
+++ b/frontend/src/components/Common/CategoryItem/CategoryItem.tsx
@@ -34,7 +34,7 @@ const ImageWrapper = styled.div`
border-radius: 10px;
background: ${({ theme }) => theme.colors.white};
- img {
+ & > img {
width: 100%;
height: auto;
object-fit: cover;
@@ -44,5 +44,5 @@ const ImageWrapper = styled.div`
const CategoryName = styled.p`
margin-top: 10px;
font-weight: 600;
- font-size: 0.8rem;
+ font-size: ${({ theme }) => theme.fontSizes.xs};
`;
diff --git a/frontend/src/components/Layout/DefaultLayout.tsx b/frontend/src/components/Layout/DefaultLayout.tsx
index 4daf634ee..39f1f8cff 100644
--- a/frontend/src/components/Layout/DefaultLayout.tsx
+++ b/frontend/src/components/Layout/DefaultLayout.tsx
@@ -25,7 +25,6 @@ const DefaultLayoutContainer = styled.div`
const MainWrapper = styled.main`
position: relative;
height: calc(100% - 120px);
- padding: 0 20px;
overflow-x: hidden;
overflow-y: auto;
`;
diff --git a/frontend/src/components/Layout/SimpleHeaderLayout.tsx b/frontend/src/components/Layout/SimpleHeaderLayout.tsx
index c6c469169..4f17b93a2 100644
--- a/frontend/src/components/Layout/SimpleHeaderLayout.tsx
+++ b/frontend/src/components/Layout/SimpleHeaderLayout.tsx
@@ -25,7 +25,7 @@ const SimpleHeaderLayoutContainer = styled.div`
const MainWrapper = styled.main`
position: relative;
height: calc(100% - 120px);
- padding: 20px;
+ padding: 20px 20px 0;
overflow-x: hidden;
overflow-y: auto;
`;
diff --git a/frontend/src/pages/HomePage.tsx b/frontend/src/pages/HomePage.tsx
index 154eb7abc..95bbe9d0c 100644
--- a/frontend/src/pages/HomePage.tsx
+++ b/frontend/src/pages/HomePage.tsx
@@ -27,7 +27,7 @@ const HomePage = () => {
-
+
์นดํ
๊ณ ๋ฆฌ
@@ -36,9 +36,9 @@ const HomePage = () => {
-
+
-
+
๐ฏ ๊ฟ์กฐํฉ ๋ญํน
@@ -48,9 +48,9 @@ const HomePage = () => {
-
+
-
+
๐ ์ํ ๋ญํน
@@ -60,9 +60,9 @@ const HomePage = () => {
-
+
-
+
๐ ๋ฆฌ๋ทฐ ๋ญํน
@@ -72,7 +72,7 @@ const HomePage = () => {
-
+
>
@@ -84,3 +84,7 @@ export default HomePage;
const Banner = styled.img`
width: 100%;
`;
+
+const SectionWrapper = styled.section`
+ padding: 0 20px;
+`;
diff --git a/frontend/src/pages/MemberPage.tsx b/frontend/src/pages/MemberPage.tsx
index 129e65f53..bb5fca6bb 100644
--- a/frontend/src/pages/MemberPage.tsx
+++ b/frontend/src/pages/MemberPage.tsx
@@ -1,6 +1,7 @@
import { Spacing } from '@fun-eat/design-system';
import { useQueryErrorResetBoundary } from '@tanstack/react-query';
import { Suspense } from 'react';
+import styled from 'styled-components';
import { ErrorBoundary, ErrorComponent, Loading, NavigableSectionTitle } from '@/components/Common';
import { MembersInfo, MemberReviewList, MemberRecipeList } from '@/components/Members';
@@ -10,7 +11,7 @@ const MemberPage = () => {
const { reset } = useQueryErrorResetBoundary();
return (
- <>
+
}>
@@ -30,8 +31,12 @@ const MemberPage = () => {
- >
+
);
};
export default MemberPage;
+
+const MemberPageContainer = styled.div`
+ padding: 20px 20px 0;
+`;
diff --git a/frontend/src/pages/MemberRecipePage.tsx b/frontend/src/pages/MemberRecipePage.tsx
index 1b7d1eaa3..f6885edbd 100644
--- a/frontend/src/pages/MemberRecipePage.tsx
+++ b/frontend/src/pages/MemberRecipePage.tsx
@@ -1,6 +1,7 @@
import { Spacing } from '@fun-eat/design-system';
import { useQueryErrorResetBoundary } from '@tanstack/react-query';
import { Suspense } from 'react';
+import styled from 'styled-components';
import { ErrorBoundary, ErrorComponent, Loading, ScrollButton, SectionTitle } from '@/components/Common';
import { MemberRecipeList } from '@/components/Members';
@@ -9,7 +10,7 @@ const MemberRecipePage = () => {
const { reset } = useQueryErrorResetBoundary();
return (
- <>
+
@@ -18,8 +19,13 @@ const MemberRecipePage = () => {
- >
+
+
);
};
export default MemberRecipePage;
+
+const MemberRecipePageContainer = styled.div`
+ padding: 20px 20px 0;
+`;
diff --git a/frontend/src/pages/MemberReviewPage.tsx b/frontend/src/pages/MemberReviewPage.tsx
index fe8584078..e0159e648 100644
--- a/frontend/src/pages/MemberReviewPage.tsx
+++ b/frontend/src/pages/MemberReviewPage.tsx
@@ -1,6 +1,7 @@
import { Spacing } from '@fun-eat/design-system';
import { useQueryErrorResetBoundary } from '@tanstack/react-query';
import { Suspense } from 'react';
+import styled from 'styled-components';
import { ErrorBoundary, ErrorComponent, Loading, ScrollButton, SectionTitle } from '@/components/Common';
import { MemberReviewList } from '@/components/Members';
@@ -9,7 +10,7 @@ const MemberReviewPage = () => {
const { reset } = useQueryErrorResetBoundary();
return (
- <>
+
@@ -18,8 +19,13 @@ const MemberReviewPage = () => {
- >
+
+
);
};
export default MemberReviewPage;
+
+const MemberReviewPageContainer = styled.div`
+ padding: 20px 20px 0;
+`;
diff --git a/frontend/src/pages/RecipeDetailPage.tsx b/frontend/src/pages/RecipeDetailPage.tsx
index 5ad75b4a5..cc77efb77 100644
--- a/frontend/src/pages/RecipeDetailPage.tsx
+++ b/frontend/src/pages/RecipeDetailPage.tsx
@@ -15,7 +15,7 @@ const RecipeDetailPage = () => {
const { id, images, title, content, author, products, totalPrice, favoriteCount, favorite, createdAt } = recipeDetail;
return (
- <>
+
{images.length > 0 ? (
@@ -65,12 +65,17 @@ const RecipeDetailPage = () => {
{content}
- >
+
+
);
};
export default RecipeDetailPage;
+const RecipeDetailPageContainer = styled.div`
+ padding: 20px 20px 0;
+`;
+
const RecipeImageContainer = styled.ul`
display: flex;
flex-direction: column;