Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] 탐색 페이지 검색바 구현 #62

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

KIMGEONHWI
Copy link
Member

📌 Related Issues

✅ 체크 리스트

  • PR 제목의 형식을 잘 작성했나요? e.g. [Feat] PR 템플릿 작성
  • 빌드가 성공했나요? (pnpm build)
  • 컨벤션을 지켰나요?
  • 이슈는 등록했나요?
  • 리뷰어와 라벨을 지정했나요?

📄 Tasks

  • 검색바 컴포넌트 구현
  • 헤더 공통 컴포넌트 뒤로가기 아이콘, X 아이콘 로직 추가

⭐ PR Point (To Reviewer)

search/index.tsx

import { useState } from 'react';
import SearchBar from '@/pages/search/components/SearchBar';
import Header from '@/components/Header';

const Search = () => {
  const [searchValue, setSearchValue] = useState('');

  const handleSearchChange = (value: string) => {
    setSearchValue(value);
  };

  const handleSearchIconClick = () => {
    console.log(searchValue);
  };

  return (
    <Header.Root>
      <Header.BackIcon />
      <SearchBar
        searchValue={searchValue}
        handleSearchChange={handleSearchChange}
        handleSearchIconClick={handleSearchIconClick}
      />
    </Header.Root>
  );
};

export default Search;

추후에 검색바 인풋 내용(searchValue)을 검색 아이콘을 클릭하면 api post 요청을 보내야하기 때문에 console.log(searchValue);로 임의로 작성해놓았습니다.

📷 Screenshot

스크린샷 2025-01-16 오전 12 43 58

🔔 ETC

@KIMGEONHWI KIMGEONHWI added 🛠️ Feature 기능 개발 건휘 Pull it back, that siren labels Jan 15, 2025
@KIMGEONHWI KIMGEONHWI self-assigned this Jan 15, 2025
@KIMGEONHWI KIMGEONHWI linked an issue Jan 15, 2025 that may be closed by this pull request
1 task
Copy link
Collaborator

@hansoojeongsj hansoojeongsj left a comment

Choose a reason for hiding this comment

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

LGTM !!

Copy link
Collaborator

@heesunee heesunee left a comment

Choose a reason for hiding this comment

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

고생하셨습니당 ㅎㅎ 코멘트 한번만 확인 해주세요!

Comment on lines +23 to +34
return (
<Flex align="center" width="29.9rem" height="4.4rem" position="relative" margin="0 0 0 1.2rem">
<IcSearchGray className={searchGrayStyle} width={24} onClick={handleSearchIconClick} />
<Input
isSearch={true}
ref={ref}
value={searchValue}
placeholder="장르나 댄서 네임을 검색해 보세요"
onChange={handleInputChange}
/>
<IcXCircleGray className={xCircleGrayStyle} width={24} onClick={handleClearInput} />
</Flex>
Copy link
Collaborator

Choose a reason for hiding this comment

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

여기 Flex에 margin="0 0 0 1.2rem" marginLeft 속성도 있어서 그냥 marginLeft="1.2rem" 으로 해도 될 것 같아요~

Comment on lines +38 to +40

SearchBar.displayName = 'SearchBar';

Copy link
Collaborator

Choose a reason for hiding this comment

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

여기 확인한번 해주세요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
건휘 Pull it back, that siren 🛠️ Feature 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] 탐색 페이지 검색바 구현
3 participants