diff --git a/frontend/src/components/DashBoard/DashboardDiscussion/DashboardDiscussion.styled.ts b/frontend/src/components/DashBoard/DashboardDiscussion/DashboardDiscussion.styled.ts index 21e3c6e3..77bed3c4 100644 --- a/frontend/src/components/DashBoard/DashboardDiscussion/DashboardDiscussion.styled.ts +++ b/frontend/src/components/DashBoard/DashboardDiscussion/DashboardDiscussion.styled.ts @@ -29,6 +29,13 @@ export const Image = styled.img` export const Container = styled.div` width: 67.4rem; height: 100%; + + @media (max-width: 1024px) { + } + + @media (max-width: 768px) { + width: 100%; + } `; export const DiscussionWrapper = styled(Link)` @@ -41,6 +48,15 @@ export const DiscussionWrapper = styled(Link)` margin-top: 3rem; margin-bottom: 1.5rem; cursor: pointer; + + @media (max-width: 1024px) { + } + + @media (max-width: 768px) { + display: flex; + flex-direction: column; + height: 15rem; + } `; export const CommentCountWrapper = styled.div` @@ -54,6 +70,13 @@ export const ImageCommentWrapper = styled.div` display: flex; justify-content: center; align-items: center; + + @media (max-width: 1024px) { + } + + @media (max-width: 768px) { + justify-content: end; + } `; export const TextWrapper = styled.div` diff --git a/frontend/src/components/DashBoard/DashboardDiscussion/index.tsx b/frontend/src/components/DashBoard/DashboardDiscussion/index.tsx index 45ee6bfb..84a6ef0e 100644 --- a/frontend/src/components/DashBoard/DashboardDiscussion/index.tsx +++ b/frontend/src/components/DashBoard/DashboardDiscussion/index.tsx @@ -17,7 +17,7 @@ export default function DashBoardDiscussionList() { hasNextGroup, } = usePagination(); - const { discussionList } = useDashboardDiscussion({ + const { discussionList, totalPage } = useDashboardDiscussion({ page: currentPage, onPageInfoUpdate: (totalPagesFromServer) => { setTotalPages(totalPagesFromServer); @@ -47,7 +47,7 @@ export default function DashBoardDiscussionList() { )} - {discussionList.length > 0 && ( + {totalPage > 0 && ( { setTotalPages(totalPagesFromServer); @@ -45,7 +45,7 @@ export default function DiscussionCommentList() { )} - {discussionCommentList.length > 0 && ( + {totalPage > 0 && ( { setTotalPages(totalPagesFromServer); @@ -45,7 +45,7 @@ export default function MyCommentList() { )} - {myComments.length > 0 && ( + {totalPage > 0 && ( props.theme.colors.grey200}; cursor: pointer; + margin: 0 auto; `; export const MissionThumbnailImg = styled.img` diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index 71b7dbdd..1ad7760d 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -283,40 +283,40 @@ export const router = createBrowserRouter(routes, { basename: ROUTES.main, }); -// async function enableMocking() { -// if (process.env.NODE_ENV !== 'development') { -// return; -// } +async function enableMocking() { + if (process.env.NODE_ENV !== 'development') { + return; + } -// const { worker } = await import('./mocks/browser'); + const { worker } = await import('./mocks/browser'); -// // `worker.start()` returns a Promise that resolves -// // once the Service Worker is up and ready to intercept requests. -// return worker.start(); -// } + // `worker.start()` returns a Promise that resolves + // once the Service Worker is up and ready to intercept requests. + return worker.start(); +} -// enableMocking().then(() => { -// root.render( -// -// -// -// -// -// -// -// -// , -// ); -// }); +enableMocking().then(() => { + root.render( + + + + + + + + + , + ); +}); -root.render( - - - - - - - - - , -); +// root.render( +// +// +// +// +// +// +// +// +// , +// ); diff --git a/frontend/src/pages/DashboardPage/DashBoardPageLayout/DashBoardPageLayout.styled.ts b/frontend/src/pages/DashboardPage/DashBoardPageLayout/DashBoardPageLayout.styled.ts index eb208d08..5a41d10a 100644 --- a/frontend/src/pages/DashboardPage/DashBoardPageLayout/DashBoardPageLayout.styled.ts +++ b/frontend/src/pages/DashboardPage/DashBoardPageLayout/DashBoardPageLayout.styled.ts @@ -7,6 +7,19 @@ export const Container = styled.div` margin-bottom: 10rem; padding: 3.5rem 0; width: 100rem; + + @media (max-width: 1024px) { + width: 80rem; + padding: 3rem 0; + gap: 3rem; + } + + @media (max-width: 768px) { + width: 90%; + padding: 2.5rem 0; + gap: 2rem; + flex-direction: column; + } `; export const ContentWrapper = styled.div` @@ -18,6 +31,14 @@ export const ProfileAndCurrentPathWrapper = styled.div` flex-direction: column; min-width: 28rem; padding: 3rem; + + @media (max-width: 1024px) { + } + + @media (max-width: 768px) { + display: flex; + flex-direction: column; + } `; export const ProfileWrapper = styled.div` @@ -25,6 +46,13 @@ export const ProfileWrapper = styled.div` flex-direction: column; align-items: center; margin-bottom: 5rem; + + @media (max-width: 1024px) { + } + + @media (max-width: 768px) { + justify-content: center; + } `; export const ProfileImageWrapper = styled.div` @@ -52,6 +80,15 @@ export const PathWrapper = styled.div` flex-direction: column; padding: 5rem 3.5rem; border-top: 1px solid ${(props) => props.theme.colors.grey200}; + + @media (max-width: 1024px) { + } + + @media (max-width: 768px) { + border: none; + margin: 0 auto; + padding: 0; + } `; export const LinkWrapper = styled.div`