Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/common/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ interface SearchProps {
onKeywordChange: (keyword: string) => void;
}

// 테스트 주석
// 들어가세요
const Search = ({ placeholder, onKeywordChange }: SearchProps) => {
const [value, setValue] = useState('');
const [isFocused, setIsFocused] = useState<boolean>(false);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

초기값이 false여서 추론 가능합니다!
boolean 제너릭빼도 될꺼같아요! 근데 원시값은 추론 가능하다는데 어디까지인지 잘 모르겠어서 이거 물어보고오쎄요!

Expand Down
3 changes: 2 additions & 1 deletion src/pages/products/hooks/useProducts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { useState, useEffect } from 'react';
import type { ProductProps, ProductsPrams } from '@/types/product';
import { productListApi } from '@/api/product/productListApi';

// useProducts
// 라라라라라랄라라라라라
//안심심한데여
export function useProducts({
page,
pageSize,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/products/module/filter/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface FilterProps {
order: 'recent' | 'favorite';
onKeywordChange: (keyword: string) => void;
}

// 테스트 주석
const Filter = ({ onOrderChange, onKeywordChange, order }: FilterProps) => {
return (
<div className={s.filter}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const GeneralProductList = () => {
keyword: debouncedKeyword,
});

// 여기는 디바운스에요
// 여기는 디바운스에요~~~

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건 따로 커스텀훅을 빼도 될꺼같아요!

useEffect(() => {
const timer = setTimeout(() => {
setDebouncedKeyword(keyword);
Expand Down