Skip to content

Commit

Permalink
feat: 불필요한 Link 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
xodms0309 committed Apr 18, 2024
1 parent e8f4b21 commit 363caa8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ const RecipeSearchResultPreviewList = ({ searchQuery }: RecipeSearchResultPrevie
{displaySlice(false, recipes, 4).map((recipe, idx) => (
<li key={recipe.id}>
{idx < 4 ? (
<Link to={`${PATH.RECIPE}/${recipe.id}`}>
<DefaultRecipeItem recipe={recipe} />
</Link>
<DefaultRecipeItem recipe={recipe} />
) : (
<Link to={`${PATH.SEARCH}/recipes?query=${searchQuery}`} className={linkWrapper}>
<div className={showMore}>
Expand Down
7 changes: 2 additions & 5 deletions src/pages/RecipeSearchListPage/RecipeSearchListPage.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { useRef } from 'react';
import { Link, useSearchParams } from 'react-router-dom';
import { useSearchParams } from 'react-router-dom';

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

import { PageHeader } from '@/components/Common';
import { DefaultRecipeItem } from '@/components/Recipe';
import SearchNotFound from '@/components/Search/SearchNotFound/SearchNotFound';
import { PATH } from '@/constants/path';
import { useIntersectionObserver } from '@/hooks/common';
import { useInfiniteRecipeSearchResultsQuery } from '@/hooks/queries/search';

Expand All @@ -30,9 +29,7 @@ export const RecipeSearchListPage = () => {
<ul className={listWrapper}>
{recipes.map((recipe) => (
<li key={recipe.id}>
<Link to={`${PATH.RECIPE}/${recipe.id}`}>
<DefaultRecipeItem recipe={recipe} />
</Link>
<DefaultRecipeItem recipe={recipe} />
</li>
))}
</ul>
Expand Down

0 comments on commit 363caa8

Please sign in to comment.