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] 검색 페이지 및 전역 상태 관리 수정 #60

Merged
merged 7 commits into from
Nov 29, 2024

Conversation

he2e2
Copy link
Collaborator

@he2e2 he2e2 commented Nov 29, 2024

📌 관련 이슈


💭 작업 내용

  • 검색 페이지 레이아웃 및 아카이브 검색 API 구현

  • 무한 스크롤 Query hook useCustomInfiniteQuery 구현

    // 사용 예시
    export const useSearchArchive = (searchKeyword: string) => {
      /*
      useCustomInfiniteQuery<API 응답 타입, 아이템 타입, Error>(Query Key, QueryFn, Size, enabled=false)
    */
      return useCustomInfiniteQuery<GetArchiveListApiResponse, ArchiveCardDTO, Error>(
        ['/archive/search', searchKeyword],
        ({ pageParam }) => getArchiveList(searchKeyword, pageParam),
        9,
      );
    };
  • 페이지 이동, 새로고침, 뒤로 가기 감지 훅 구현 usePageLifecycle

    // 사용 예시
    usePageLifecycle({
      onNavigate: () => {
        console.log('페이지 이동 감지');
      },
      onBack: () => {
        console.log('브라우저 뒤로 가기 감지');
      },
      onRefresh: () => {
        console.log('페이지 새로고침 감지');
      },
    });
  • 아카이브 작성, 수정 중

    • 새로고침 시, 세션 스토리지에 저장 된 데이터 사용
    • 페이지 이동 시, 전역 상태 초기화

🤔 참고 사항

  • 검색 기능은 훅만 만들어두고 연결은 안 해놔서 실제 API 명세서 나오면 연결할 것 같습니다.

@he2e2 he2e2 added 🎨 Html&css 마크업 & 스타일링 ✨ Feature 기능 개발 📬 API 서버 API 통신 labels Nov 29, 2024
@he2e2 he2e2 self-assigned this Nov 29, 2024
Copy link

netlify bot commented Nov 29, 2024

Deploy Preview for palettee22 ready!

Name Link
🔨 Latest commit 4928e28
🔍 Latest deploy log https://app.netlify.com/sites/palettee22/deploys/67492564cfc2e50008175d5c
😎 Deploy Preview https://deploy-preview-60--palettee22.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

⚡ Lighthouse report for http://localhost:3000/

Category Score
🔴 Performance 23
🟢 Accessibility 95
🟢 Best Practices 100
🟠 SEO 83

Detailed Metrics

Metric Value
🔴 First Contentful Paint 40.4 s
🔴 Largest Contentful Paint 67.5 s
🔴 Total Blocking Time 1,050 ms
🟢 Cumulative Layout Shift 0
🔴 Speed Index 53.0 s

Copy link
Collaborator

@joarthvr joarthvr 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

@csk6314 csk6314 left a comment

Choose a reason for hiding this comment

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

LGTM~

@joarthvr joarthvr merged commit 0419250 into dev Nov 29, 2024
5 checks passed
@he2e2 he2e2 deleted the feat/#56-search branch November 29, 2024 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📬 API 서버 API 통신 ✨ Feature 기능 개발 🎨 Html&css 마크업 & 스타일링
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants