Skip to content

Commit

Permalink
refactor: 페이지 레이아웃 이름을 더 직관적이고 단순하게 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ImxYJL committed Jan 4, 2025
1 parent 4474aeb commit e3a57a1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WrittenReviewContent } from '../../layouts';
import { PageContentLayout } from '../../layouts';
import { NoSelectedReviewGuide } from '../index';

import * as S from './styles';
Expand All @@ -17,11 +17,11 @@ const DetailedWrittenReview = ({ $isMobile, selectedReviewId }: DetailedWrittenR
// 라우팅으로 넘어온 경우 무조건 isMobile은 true
return (
<S.DetailedWrittenReview $isMobile={$isMobile}>
<WrittenReviewContent title="작성한 리뷰 상세보기">
<PageContentLayout title="작성한 리뷰 상세보기">
<S.Outline>
{selectedReviewId ? <div style={{ height: '120vh' }}>있다</div> : <NoSelectedReviewGuide />}
</S.Outline>
</WrittenReviewContent>
</PageContentLayout>
</S.DetailedWrittenReview>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ReviewListItem from '@/components/ReviewListItem';

import { WrittenReviewContent } from '../../layouts';
import { PageContentLayout } from '../../layouts';

import * as S from './styles';

Expand All @@ -13,7 +13,7 @@ const WrittenReviewList = ({ handleClick }: WrittenReviewListProps) => {
const reviewIdList = [5, 1, 2, 3, 4];

return (
<WrittenReviewContent title="작성한 리뷰 목록">
<PageContentLayout title="작성한 리뷰 목록">
<S.WrittenReviewList>
{/** 추후 이벤트 위임 형식으로 변경 가능 */}

Expand All @@ -22,7 +22,7 @@ const WrittenReviewList = ({ handleClick }: WrittenReviewListProps) => {
<ReviewListItem key={reviewId} handleClick={() => handleClick(reviewId)} />
))}
</S.WrittenReviewList>
</WrittenReviewContent>
</PageContentLayout>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ interface WrittenReviewItemProps {
title: string;
}

const WrittenReviewContent = ({ title, children }: EssentialPropsWithChildren<WrittenReviewItemProps>) => {
const PageContentLayout = ({ title, children }: EssentialPropsWithChildren<WrittenReviewItemProps>) => {
return (
<S.WrittenReviewContent>
<S.PageContentLayout>
<S.Title>{title}</S.Title>
<S.Content>{children}</S.Content>
</S.WrittenReviewContent>
</S.PageContentLayout>
);
};

export default WrittenReviewContent;
export default PageContentLayout;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styled from '@emotion/styled';

import media from '@/utils/media';

export const WrittenReviewContent = styled.article`
export const PageContentLayout = styled.article`
display: flex;
flex-direction: column;
height: 100%;
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default as WrittenReviewContent } from './WrittenReviewContent';
export { default as PageContentLayout } from './PageContentLayout';

0 comments on commit e3a57a1

Please sign in to comment.