Skip to content

Commit

Permalink
refactor: 상품 페이지 헤더 topbar로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Leejin-Yang committed Apr 22, 2024
1 parent 04ab95c commit 959c3fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/pages/ProductDetailPage/ProductDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import NotFoundPage from '../NotFoundPage';

import {
SortButton,
PageHeader,
SectionHeader,
ErrorBoundary,
ErrorComponent,
Loading,
SelectOptionList,
TopBar,
} from '@/components/Common';
import { ProductDetailItem, ProductRecipeList } from '@/components/Product';
import { ReviewList } from '@/components/Review';
Expand Down Expand Up @@ -55,7 +55,12 @@ export const ProductDetailPage = () => {

return (
<>
<PageHeader title="상세" hasBackLink />
<TopBar>
<TopBar.BackLink />
<TopBar.Title title="상세" />
<TopBar.Spacer />
</TopBar>

<main className={main}>
<ProductDetailItem productDetail={productDetail} />

Expand Down
8 changes: 6 additions & 2 deletions src/pages/ProductListPage/ProductListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useLocation, useParams } from 'react-router-dom';
import { categoryButton, listSection, main, selectButton, selectSection, sortButton } from './productListPage.css';
import NotFoundPage from '../NotFoundPage';

import { ErrorBoundary, ErrorComponent, Loading, PageHeader, SelectOptionList, SvgIcon } from '@/components/Common';
import { ErrorBoundary, ErrorComponent, Loading, SelectOptionList, SvgIcon, TopBar } from '@/components/Common';
import { ProductList } from '@/components/Product';
import { CATEGORY_TYPE, PAGE_TITLE, PRODUCT_SORT_OPTIONS } from '@/constants';
import { useSelect } from '@/hooks/common';
Expand Down Expand Up @@ -46,7 +46,11 @@ export const ProductListPage = () => {

return (
<>
<PageHeader title={pageTitle} hasBackLink hasSearchLink state={category} />
<TopBar>
<TopBar.BackLink state={category} />
<TopBar.Title title={pageTitle} />
<TopBar.SearchLink />
</TopBar>

<main className={main}>
<section className={selectSection}>
Expand Down

0 comments on commit 959c3fd

Please sign in to comment.