-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ business-logic ] chore: zustand, react-query 라이브러리 추가 - fetch 및 상태 관리를 위해 @tanstack/react-query - 전역상태관리를 위해 zustand - 데이터 불변성 유지를 위해 Immer [ business-logic ] feat: NFT 쿼리 및 타입 정의 - NFT 관련 무한 스크롤 쿼리 구현 (Top Banner, Scroll List) - React Query 무한 스크롤 옵션 및 쿼리 키 설정 - 메인 페이지 초기 데이터 fetching 로직 추가 - NFT 관련 타입 정의 [ business-logic ] feat: Zustand 메인 스토어 및 타입 정의 - 메인 페이지 상태 관리를 위한 Zustand 스토어 생성 - 탭 상태 및 상태 변경 액션 정의 - Immer 미들웨어를 사용한 불변성 유지 - 타입 안전성을 위한 타입 정의 [ business-logic ] feat: Main 페이지 데이터 페칭, 스켈레톤 UI 구현 - Top NFT섹션 스켈레톤 UI 추가 - 데이터 페칭 로직 추가 [ business-logic ] feat: Add React Query DevTools for development debugging [ business-logic ] refactor: LazyImage 컴포넌트 스켈레톤 UI Wrapper 추가 - 스켈레톤 UI에 루트 클래스명 적용 - 스켈레톤 로딩 시 래퍼 div 추가로 스타일링 유연성 개선 [ business-logic ] feat: VirtualScroller 무한 스크롤 기능 추가 ( 데이터페칭 ) - 무한 스크롤 상태 타입 정의 (infiniteScrollStatus) - 마지막 아이템 감지 시 다음 페이지 데이터 로드 로직 구현 - 타입 파일 분리로 코드 구조화 [ business-logic ] refactor: Main, Sub 페이지 스켈레톤 UI 및 데이터 페칭 로직 개선 - 메인/서브 페이지 스켈레톤 UI 로직 리팩토링 - 데이터 로딩 상태에 따른 null 데이터 처리 - 무한 스크롤 및 데이터 페칭 상태 관리 개선 - 타입 정의 및 컴포넌트 로직 최적화 [ business-logic ] feat: TypeScript 유형 추출을 위한 ArrayItem 유틸리티 유형 추가 - 배열에서 요소 유형을 추출하기 위한 새로운 유틸리티 유형 - 배열 항목 유형을 추론하는 유형 안전 방법을 제공 [ business-logic ] bugfix: react-query 타입 문제 - 신규버전부터 key에 대한 추론값 이슈 * TanStack/query#8453 [ business-logic ] chore: Disable react-hooks/exhaustive-deps ESLint rule - Temporarily turn off exhaustive-deps rule to suppress warnings - Allows more flexibility in dependency management for hooks [ business-logic ] refactor: Signal 옵션 추가 및 쿼리키 옵션 수정 - 요청 취소를 활성화하기 위해 API 호출에 AbortSignal 지원 추가 - 더 나은 캐싱을 위해 무한 스크롤 목록 쿼리 키에 카테고리 포함 - useFetchMainPageInit에서 하드코딩된 페이지 매개변수 제거 - 쿼리 기능 유형의 안전성 및 유연성 향상 [ business-logic ] refactor: 메인 템플릿에서 무한 스크롤 및 데이터 가져오기 개선 - VirtualScroller 업데이트 - 무한스크롤 로딩 및 스켈레톤 UI를 지원하도록 메인템플릿 수정 - NFT 항목에 대한 데이터 렌더링 및 유형 관리 간소화 [ business-logic ] refactor: 이미지 생성기 seed parameter 추가 [ business-logic ] refactor: NFT카테고리 무한 스크롤 영역 gcTime 수정 - 0으로 설정 * 추후 고도화된 요구사항으로 변경 예정
- Loading branch information
Showing
169 changed files
with
1,614 additions
and
870 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+9.82 KB
...data-npm-7.26.5-b6047aeefb-7aaac0e79c.zip → ...data-npm-7.26.8-fb802c4940-1bb04c6860.zip
Binary file not shown.
Binary file renamed
BIN
+251 KB
...core-npm-7.26.7-7cf6c69e74-017ad8db99.zip → ...core-npm-7.26.9-12b18cb40d-b6e33bdcbb.zip
Binary file not shown.
Binary file renamed
BIN
+138 KB
...ator-npm-7.26.5-8de063382c-baa42a98cd.zip → ...ator-npm-7.26.9-3260f562f4-57d034fb6c.zip
Binary file not shown.
Binary file renamed
BIN
+287 KB
...pers-npm-7.26.7-284c12b13e-1c93604c7f.zip → ...pers-npm-7.26.9-629d8a6154-06363f8288.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+128 KB
...time-npm-7.26.7-685f05ad2c-a1664a08f3.zip → ...time-npm-7.26.9-8369ff039f-838492d8a9.zip
Binary file not shown.
Binary file renamed
BIN
+26.4 KB
...late-npm-7.25.9-d903b7b6d5-103641fea1.zip → ...late-npm-7.26.9-6339558068-32259298c7.zip
Binary file not shown.
Binary file renamed
BIN
+191 KB
...erse-npm-7.26.7-18316b804e-22ea8aed13.zip → ...erse-npm-7.26.9-5dc40fea71-d42d3a5e61.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+6.49 KB
...nfirm-npm-5.1.4-1eaaf72b09-fa5958ef9f.zip → ...nfirm-npm-5.1.6-cc9f3ec6e5-445314a547.zip
Binary file not shown.
Binary file renamed
BIN
+53.8 KB
...core-npm-10.1.5-4dd06038d6-a0e2268d7d.zip → ...core-npm-10.1.7-492590911b-2c65c367bd.zip
Binary file not shown.
Binary file renamed
BIN
+7.83 KB
...-type-npm-3.0.3-440dd9c096-1aef2724ae.zip → ...-type-npm-3.0.4-5d65c9c443-64ec072d27.zip
Binary file not shown.
Binary file removed
BIN
-10.3 KB
...ache/@joshwooding-vite-plugin-react-docgen-typescript-npm-0.4.2-8a1c49033c-0841d93df4.zip
Binary file not shown.
Binary file added
BIN
+12.7 KB
...ache/@joshwooding-vite-plugin-react-docgen-typescript-npm-0.5.0-903822ae2b-ffdb06d892.zip
Binary file not shown.
Binary file renamed
BIN
+426 KB
...tors-npm-0.37.5-065eecd6e6-5401b0c1ad.zip → ...tors-npm-0.37.6-dd542ff9fe-89d9e41dba.zip
Binary file not shown.
Binary file removed
BIN
-10 KB
.yarn/cache/@radix-ui-react-collection-npm-1.1.1-cc547f8ac0-413fbcb542.zip
Binary file not shown.
Binary file added
BIN
+10.1 KB
.yarn/cache/@radix-ui-react-collection-npm-1.1.2-99cb65db59-4401f36778.zip
Binary file not shown.
Binary file removed
BIN
-10.3 KB
.yarn/cache/@radix-ui-react-primitive-npm-2.0.1-a63c88e534-d758822091.zip
Binary file not shown.
Binary file added
BIN
+10.3 KB
.yarn/cache/@radix-ui-react-primitive-npm-2.0.2-53536e6763-3a6144ed16.zip
Binary file not shown.
Binary file removed
BIN
-19.8 KB
.yarn/cache/@radix-ui-react-roving-focus-npm-1.1.1-0626400ec8-f3a78bd15c.zip
Binary file not shown.
Binary file added
BIN
+19.9 KB
.yarn/cache/@radix-ui-react-roving-focus-npm-1.1.2-39bc360a6b-4a57f5af51.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-14.9 KB
.yarn/cache/@radix-ui-react-tabs-npm-1.1.2-27f5804c07-21c9ed2e65.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+22.1 KB
...tions-npm-8.5.2-36e57d4ff9-b800e2e5d3.zip → ...tions-npm-8.5.6-51e01ed0d2-f042278d43.zip
Binary file not shown.
Binary file renamed
BIN
+10.4 KB
...ounds-npm-8.5.2-bda644a20b-5e4d032672.zip → ...ounds-npm-8.5.6-a2345a62a7-26a462d258.zip
Binary file not shown.
Binary file renamed
BIN
+70 KB
...trols-npm-8.5.2-b3029d5513-b90d2ad9a8.zip → ...trols-npm-8.5.6-2827af8673-93a77c5001.zip
Binary file not shown.
Binary file removed
BIN
-525 KB
.yarn/cache/@storybook-addon-docs-npm-8.5.2-cee81d80ff-52f9981931.zip
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+14.5 KB
...tials-npm-8.5.2-87438890d7-857a3c9a2c.zip → ...tials-npm-8.5.6-382ceec5d0-b803c445bb.zip
Binary file not shown.
Binary file renamed
BIN
+5.68 KB
...light-npm-8.5.2-c638528a95-f02b44ba4b.zip → ...light-npm-8.5.6-1586e28c82-6b732a7dd0.zip
Binary file not shown.
Binary file renamed
BIN
+38.3 KB
...tions-npm-8.5.2-8cfb56a1ac-931d66c40c.zip → ...tions-npm-8.5.6-195eb2b396-4a278d8928.zip
Binary file not shown.
Binary file renamed
BIN
+11.9 KB
...asure-npm-8.5.2-71522ae624-18728df434.zip → ...asure-npm-8.5.6-4e5cce0888-04792d1e48.zip
Binary file not shown.
Binary file renamed
BIN
+56 KB
...rding-npm-8.5.2-9fc8556bd0-d411755a5b.zip → ...rding-npm-8.5.6-df733162d0-63b33f5cdf.zip
Binary file not shown.
Binary file renamed
BIN
+8 KB
...tline-npm-8.5.2-94f140585a-8ff1743a2f.zip → ...tline-npm-8.5.6-4b4f1c4e5a-642b9d2eae.zip
Binary file not shown.
Binary file renamed
BIN
+5.29 KB
...lbars-npm-8.5.2-3f70f879bd-13b46c39a9.zip → ...lbars-npm-8.5.6-9ecd014197-6d5dfd013b.zip
Binary file not shown.
Binary file renamed
BIN
+9.02 KB
...wport-npm-8.5.2-b8168908d7-35a8d5b72a.zip → ...wport-npm-8.5.6-9a67d17799-b1720a9f75.zip
Binary file not shown.
Binary file renamed
BIN
+155 KB
...locks-npm-8.5.2-f75abbea2f-24a0af14f6.zip → ...locks-npm-8.5.6-a637a0850c-c1ebd6a04e.zip
Binary file not shown.
Binary file removed
BIN
-122 KB
.yarn/cache/@storybook-builder-vite-npm-8.5.2-cac8ca5bd1-f4d1bfe8c3.zip
Binary file not shown.
Binary file added
BIN
+123 KB
.yarn/cache/@storybook-builder-vite-npm-8.5.6-33e003d763-7c239bed2e.zip
Binary file not shown.
Binary file removed
BIN
-1.6 KB
.yarn/cache/@storybook-components-npm-8.5.2-9fdc3eadd4-4206c43e12.zip
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+4.53 MB
...-core-npm-8.5.2-7dd907aa6a-1a560cc765.zip → ...-core-npm-8.5.6-80892390d4-3190dc684f.zip
Binary file not shown.
Binary file renamed
BIN
+6.59 KB
...lugin-npm-8.5.2-dd16b1115c-af6d1e2e4c.zip → ...lugin-npm-8.5.6-419548d769-02ec8d8436.zip
Binary file not shown.
Binary file removed
BIN
-57.4 KB
.yarn/cache/@storybook-instrumenter-npm-8.5.2-fc4483d8c0-b94bdb6dbb.zip
Binary file not shown.
Binary file added
BIN
+57.5 KB
.yarn/cache/@storybook-instrumenter-npm-8.5.6-832f09c17d-980d0538e5.zip
Binary file not shown.
Binary file renamed
BIN
+1.61 KB
...r-api-npm-8.5.2-15d64a8fed-df28e23339.zip → ...r-api-npm-8.5.6-099ce82a6d-f2135398cc.zip
Binary file not shown.
Binary file renamed
BIN
+1.61 KB
...w-api-npm-8.5.2-15bb962743-27e5f1b8d9.zip → ...w-api-npm-8.5.6-e7e9a03b80-bcdd8117aa.zip
Binary file not shown.
Binary file renamed
BIN
+6.54 KB
...-shim-npm-8.5.2-b53d9e6fa6-ff0b6cda7f.zip → ...-shim-npm-8.5.6-1ce3bddd07-3b30f2675a.zip
Binary file not shown.
Binary file renamed
BIN
+235 KB
...react-npm-8.5.2-cd9fbe32bd-db136c70b8.zip → ...react-npm-8.5.6-e962fcc007-aaafdd35d8.zip
Binary file not shown.
Binary file renamed
BIN
+6.56 KB
...-vite-npm-8.5.2-11996c017d-170a913170.zip → ...-vite-npm-8.5.6-7f3e396c2f-4b55d7adcd.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+2.22 KB
...eming-npm-8.5.2-cc9237da44-c53f7c5cf6.zip → ...eming-npm-8.5.6-ff06ba6f2c-983f607be4.zip
Binary file not shown.
Binary file renamed
BIN
+12.6 MB
...darwin-arm64-npm-1.10.11-38675d2216-8.zip → ...darwin-arm64-npm-1.10.16-c4effabd52-8.zip
Binary file not shown.
Binary file renamed
BIN
+23.9 KB
...ore-npm-1.10.11-1c0fb185d0-f0c389d9a3.zip → ...ore-npm-1.10.16-bc4b46a879-f76ec3212a.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-930 KB
.yarn/cache/@tailwindcss-oxide-darwin-arm64-npm-4.0.0-b5fd6b9094-8.zip
Binary file not shown.
Binary file added
BIN
+929 KB
.yarn/cache/@tailwindcss-oxide-darwin-arm64-npm-4.0.6-6157cff64e-8.zip
Binary file not shown.
Binary file renamed
BIN
+3.68 KB
...oxide-npm-4.0.0-5c54a378a2-8038a6bec7.zip → ...oxide-npm-4.0.6-2aab382160-4de1f4b577.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+503 KB
.yarn/cache/@tanstack-query-devtools-npm-5.65.0-18e92806e4-6c33dfcca8.zip
Binary file not shown.
Binary file added
BIN
+50 KB
.yarn/cache/@tanstack-react-query-devtools-npm-5.66.3-568fd594c9-52eae96b2d.zip
Binary file not shown.
Binary file added
BIN
+288 KB
.yarn/cache/@tanstack-react-query-npm-5.66.3-eef835bf49-a00fa538c7.zip
Binary file not shown.
Binary file renamed
BIN
+8.65 KB
...tual-npm-3.11.3-2351dc40f3-eb39f8a015.zip → ...tual-npm-3.13.0-c7ecd1720c-0cc6fcc63d.zip
Binary file not shown.
Binary file removed
BIN
-50.6 KB
.yarn/cache/@tanstack-virtual-core-npm-3.11.3-2794e4e621-43dacdd278.zip
Binary file not shown.
Binary file added
BIN
+51.4 KB
.yarn/cache/@tanstack-virtual-core-npm-3.13.0-e3bab340b7-0cbead3350.zip
Binary file not shown.
Binary file renamed
BIN
+9.5 KB
...-dom-npm-19.0.3-c704dfd4e3-a253931fc3.zip → ...-dom-npm-19.0.4-d87a27eb4c-2d0c74769d.zip
Binary file not shown.
Binary file renamed
BIN
+149 KB
...eact-npm-19.0.8-d37f2f1ef6-80dd2e7fa4.zip → ...act-npm-19.0.10-ad7744c06a-e257e87bc3.zip
Binary file not shown.
Binary file renamed
BIN
+350 KB
...ager-npm-8.22.0-e9d4565a7f-0aa51fbf3a.zip → ...ager-npm-8.24.0-ebd5c7755e-1b24d97284.zip
Binary file not shown.
Binary file renamed
BIN
+33.9 KB
...ypes-npm-8.22.0-cc19234a46-37fae8f21f.zip → ...ypes-npm-8.24.0-79e1deef4b-3154811978.zip
Binary file not shown.
Binary file renamed
BIN
+187 KB
...tree-npm-8.22.0-3f7a16feac-e7fd704869.zip → ...tree-npm-8.24.0-0efb13ddb1-7415a35edc.zip
Binary file not shown.
Binary file renamed
BIN
+117 KB
...tils-npm-8.22.0-5491e74318-976cd0e2ac.zip → ...tils-npm-8.24.0-ff783b2b9b-de2897d1d2.zip
Binary file not shown.
Binary file renamed
BIN
+9.79 KB
...keys-npm-8.22.0-5832313ce6-df205177bc.zip → ...keys-npm-8.24.0-55da63df3a-c07ef21d5d.zip
Binary file not shown.
Binary file removed
BIN
-13.2 KB
.yarn/cache/@vitejs-plugin-react-swc-npm-3.7.2-9b9d5c642b-3b7888ba70.zip
Binary file not shown.
Binary file added
BIN
+13.7 KB
.yarn/cache/@vitejs-plugin-react-swc-npm-3.8.0-9d9e489793-cb6effd4e9.zip
Binary file not shown.
Binary file renamed
BIN
+11.8 KB
...ormat-npm-2.1.8-7772c45366-2214ca317a.zip → ...ormat-npm-2.1.9-94ea1cc996-33f7ff0a9d.zip
Binary file not shown.
Binary file renamed
BIN
+43.4 KB
...utils-npm-2.1.8-c6ae62adcf-711e7998ba.zip → ...utils-npm-2.1.9-355aea689e-b24fb9c676.zip
Binary file not shown.
Binary file removed
BIN
-10.3 KB
.yarn/cache/call-bind-apply-helpers-npm-1.0.1-cda777c96d-3c55343261.zip
Binary file not shown.
Binary file added
BIN
+10.7 KB
.yarn/cache/call-bind-apply-helpers-npm-1.0.2-3eedbea3bb-b2863d74fc.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+27.3 KB
.yarn/cache/electron-to-chromium-npm-1.5.101-3a8e6240c4-e8358a7c56.zip
Binary file not shown.
Binary file removed
BIN
-27 KB
.yarn/cache/electron-to-chromium-npm-1.5.90-074751336b-614d79b67e.zip
Binary file not shown.
Binary file renamed
BIN
+65 KB
...olve-npm-5.18.0-afcf74b9eb-77c6b11f0d.zip → ...olve-npm-5.18.1-d16da9a150-de5bea7deb.zip
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+6.56 KB
...resh-npm-0.4.18-3857cb5d46-c93283d151.zip → ...resh-npm-0.4.19-97911e7788-b676d7d5a1.zip
Binary file not shown.
Binary file renamed
BIN
+49.1 KB
...book-npm-0.11.2-69b39192d6-04dab47b67.zip → ...book-npm-0.11.3-68fa073e0b-fc5a2558f8.zip
Binary file not shown.
Binary file removed
BIN
-22.3 KB
.yarn/cache/exponential-backoff-npm-3.1.1-04df458b30-3d21519a4f.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-7.03 KB
.yarn/cache/possible-typed-array-names-npm-1.0.0-3a8176348a-b32d403ece.zip
Binary file not shown.
Binary file added
BIN
+6.54 KB
.yarn/cache/possible-typed-array-names-npm-1.1.0-ce60ca4401-cfcd4f0526.zip
Binary file not shown.
Binary file renamed
BIN
+66.1 KB
...stcss-npm-8.5.1-90fd898a99-cfdcfcd019.zip → ...stcss-npm-8.5.2-53c3155d31-5097c458ce.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+13.6 KB
...ddirp-npm-4.1.1-c531313b8b-9936aafa30.zip → ...ddirp-npm-4.1.2-3440472afe-3242ee1254.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+40.1 KB
...emver-npm-7.7.0-2100277c86-a4eefdada9.zip → ...emver-npm-7.7.1-4572475307-586b825d36.zip
Binary file not shown.
Binary file renamed
BIN
+43.6 KB
...socks-npm-2.8.3-3532b59899-7a6b7f6eed.zip → ...socks-npm-2.8.4-8194b86bd0-cd1edc9244.zip
Binary file not shown.
Binary file renamed
BIN
+31 KB
...ybook-npm-8.5.2-e05e4a9a29-02442d7b46.zip → ...ybook-npm-8.5.6-96102d3579-5e46d96be8.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+174 KB
...fest-npm-4.33.0-34a5b19843-42c9a4e305.zip → ...fest-npm-4.35.0-9c20cd5f20-14581e7b02.zip
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
import { RouterProvider } from 'react-router'; | ||
import { router } from './router'; | ||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; | ||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; | ||
|
||
import { router } from '@/router'; | ||
|
||
const queryClient = new QueryClient(); | ||
|
||
function App() { | ||
return <RouterProvider router={router} />; | ||
return ( | ||
<QueryClientProvider client={queryClient}> | ||
<RouterProvider router={router} /> | ||
<ReactQueryDevtools initialIsOpen={false} /> | ||
</QueryClientProvider> | ||
); | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,55 @@ | ||
import { QueryParamsType } from '@/api/client/http-client'; | ||
|
||
/** | ||
* NFT 카테고리 | ||
*/ | ||
export type TCategory = 'ALL' | 'ART' | 'GAME'; | ||
|
||
/** | ||
* NFT 카드 아이템 | ||
*/ | ||
export interface ICardItem { | ||
/** | ||
* 아이디 | ||
*/ | ||
id: number; | ||
/** | ||
* 제목 | ||
*/ | ||
title: string; | ||
image: string; | ||
/** | ||
* 설명 | ||
*/ | ||
description: string; | ||
/** | ||
* 이미지 URL | ||
*/ | ||
imageUrl?: string; | ||
/** | ||
* 카테고리 | ||
*/ | ||
category: Omit<TCategory, 'ALL'>; | ||
/** | ||
* 푸터 | ||
*/ | ||
footer: string; | ||
} | ||
|
||
export interface IGetTopBannerReq extends QueryParamsType { | ||
page: string; | ||
export interface IGetTopBannerReq { | ||
page: number; | ||
} | ||
export interface IGetTopBannerRes { | ||
list: Array<ICardItem>; | ||
nextCursor: string; | ||
hasNext: boolean; | ||
} | ||
|
||
export interface IGetScrollListReq extends QueryParamsType { | ||
category: 'BEST' | 'RECOMMEND' | 'NEW'; | ||
page: string; | ||
export interface IGetScrollListReq { | ||
category: TCategory; | ||
page: number; | ||
} | ||
export interface IGetScrollListRes { | ||
list: Array<ICardItem>; | ||
nextCursor: string; | ||
hasNext: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { AxiosResponse } from 'axios'; | ||
|
||
import { CLIENT_API } from '.'; | ||
|
||
/** | ||
* INFO: 타입 추출을 위한 유틸리티 타입 정의 | ||
*/ | ||
export type ExtractResponseType<T> = | ||
T extends Promise<AxiosResponse<infer R, unknown>> ? R : never; | ||
|
||
/** | ||
* INFO: 배열 타입 추출을 위한 유틸리티 타입 정의 | ||
*/ | ||
export type ExtractArrayType<T> = T extends Array<infer R> ? R : never; | ||
|
||
export type TGetTopBanner = typeof CLIENT_API.DemoControllerApi.getTopBanner; | ||
export type TGetScrollList = typeof CLIENT_API.DemoControllerApi.getScrollList; | ||
|
||
export type TGetTopBannerParams = Parameters<TGetTopBanner>[0]; | ||
export type TGetScrollListParams = Parameters<TGetScrollList>[0]; | ||
|
||
export type TGetTopBannerResponse = ExtractResponseType< | ||
ReturnType<TGetTopBanner> | ||
>; | ||
export type TGetScrollListResponse = ExtractResponseType< | ||
ReturnType<TGetScrollList> | ||
>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { useInfiniteQuery } from '@tanstack/react-query'; | ||
import { useWindowVirtualizer } from '@tanstack/react-virtual'; | ||
|
||
/** | ||
* useWindowVirtualizer의 파라미터 타입 추론 | ||
*/ | ||
export type TUseWindowVirtualizerParams = Parameters< | ||
typeof useWindowVirtualizer | ||
>[0]; | ||
|
||
/** | ||
* 무한 스크롤 상태 | ||
*/ | ||
export type TInfiniteScrollStatus = Partial< | ||
ReturnType<typeof useInfiniteQuery> | ||
> & { | ||
/** | ||
* 로딩 플레이스홀더 개수 | ||
*/ | ||
loadingPlaceholderCount?: number; | ||
/** | ||
* 호출한 데이터 리스의 길이 | ||
*/ | ||
itemsCount?: number; | ||
/** | ||
* 무한 스크롤을 호출할 인덱스, 뒤에서 계산 | ||
*/ | ||
fetchingTriggerIndexFromEnd?: number; | ||
}; | ||
/** | ||
* VirtualScroller의 기본 Props | ||
*/ | ||
interface IVirtualScrollerProps<T extends React.ElementType> { | ||
as?: T; | ||
/** | ||
* 열 간격 | ||
*/ | ||
columnsGap?: number; | ||
/** | ||
* 가상 스크롤러 옵션 | ||
*/ | ||
virtualizerOptions: TUseWindowVirtualizerParams; | ||
/** | ||
* 가상화 높이가 정해지는 컨테이너의 ClassName | ||
*/ | ||
scrollInnerClassName?: string; | ||
/** | ||
* 아이템 렌더링 함수 | ||
*/ | ||
renderItem: (index: number) => React.ReactNode; | ||
/** | ||
* 무한 스크롤 상태 | ||
*/ | ||
infiniteScrollStatus?: TInfiniteScrollStatus; | ||
} | ||
/** | ||
* VirtualScroller ComponentProps | ||
*/ | ||
export type TExtendsVirtualScrollerComponentProps< | ||
T extends React.ElementType = 'div', | ||
> = IVirtualScrollerProps<T> & React.ComponentPropsWithRef<T>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.