Skip to content

Commit

Permalink
feat: PageHeader 컴포넌트를 TopBar 컴포넌트로 교체
Browse files Browse the repository at this point in the history
  • Loading branch information
xodms0309 committed Apr 19, 2024
1 parent 363caa8 commit d5a74b4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/Common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ export { default as PageHeader } from './PageHeader/PageHeader';
export { default as Badge } from './Badge/Badge';
export { default as WriteButton } from './WriteButton/WriteButton';
export { default as Text } from './Text/Text';
export { default as TopBar } from './TopBar/TopBar';
8 changes: 6 additions & 2 deletions src/pages/ProductSearchListPage/ProductSearchListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useSearchParams } from 'react-router-dom';

import { container } from './productSearchListPage.css';

import { PageHeader } from '@/components/Common';
import { TopBar } from '@/components/Common';
import { ProductOverviewList } from '@/components/Product';
import { useIntersectionObserver } from '@/hooks/common';
import { useInfiniteProductSearchResultsQuery } from '@/hooks/queries/search';
Expand All @@ -24,7 +24,11 @@ export const ProductSearchListPage = () => {

return (
<>
<PageHeader title={`'${searchQuery}'이/가 포함된 상품`} hasBackLink />
<TopBar>
<TopBar.BackLink />
<TopBar.Title title={`'${searchQuery}'이/가 포함된 상품`} />
<TopBar.Spacer />
</TopBar>
<div className={container}>
<ProductOverviewList products={products} hasBorder />
</div>
Expand Down
8 changes: 6 additions & 2 deletions src/pages/RecipeSearchListPage/RecipeSearchListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useSearchParams } from 'react-router-dom';

import { listWrapper } from './recipeSearchListPage.css';

import { PageHeader } from '@/components/Common';
import { TopBar } from '@/components/Common';
import { DefaultRecipeItem } from '@/components/Recipe';
import SearchNotFound from '@/components/Search/SearchNotFound/SearchNotFound';
import { useIntersectionObserver } from '@/hooks/common';
Expand All @@ -25,7 +25,11 @@ export const RecipeSearchListPage = () => {

return (
<>
<PageHeader title={`'${searchQuery}'이/가 포함된 꿀조합`} hasBackLink />
<TopBar>
<TopBar.Title title={`'${searchQuery}'이/가 포함된 꿀조합`} />
<TopBar.BackLink />
<TopBar.Spacer />
</TopBar>
<ul className={listWrapper}>
{recipes.map((recipe) => (
<li key={recipe.id}>
Expand Down

0 comments on commit d5a74b4

Please sign in to comment.