From e5d0b02504f7f2611a53caad0d5c62fa912a043c Mon Sep 17 00:00:00 2001 From: yungblud Date: Sun, 2 Feb 2025 11:57:22 +0900 Subject: [PATCH 01/41] feat(billets-app): :package: v1.6.8 --- apps/billets-app/android/app/build.gradle | 4 ++-- apps/billets-app/ios/FstvlLifeApp.xcodeproj/project.pbxproj | 6 +++--- apps/billets-app/package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/billets-app/android/app/build.gradle b/apps/billets-app/android/app/build.gradle index 18719da1..d0fcffdd 100644 --- a/apps/billets-app/android/app/build.gradle +++ b/apps/billets-app/android/app/build.gradle @@ -97,8 +97,8 @@ android { applicationId "com.fstvllife.android" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 16 - versionName "1.6.7" + versionCode 17 + versionName "1.6.8" resValue "string", "CodePushDeploymentKey", project.env.get("ANDROID_CODE_PUSH_DEPLOYMENT_KEY") ?: "" } diff --git a/apps/billets-app/ios/FstvlLifeApp.xcodeproj/project.pbxproj b/apps/billets-app/ios/FstvlLifeApp.xcodeproj/project.pbxproj index 34765f39..01d21c1e 100644 --- a/apps/billets-app/ios/FstvlLifeApp.xcodeproj/project.pbxproj +++ b/apps/billets-app/ios/FstvlLifeApp.xcodeproj/project.pbxproj @@ -600,7 +600,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.6.7; + MARKETING_VERSION = 1.6.8; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -632,7 +632,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.6.7; + MARKETING_VERSION = 1.6.8; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -923,7 +923,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.6.7; + MARKETING_VERSION = 1.6.8; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/apps/billets-app/package.json b/apps/billets-app/package.json index 3dae79f6..ccc9bb50 100644 --- a/apps/billets-app/package.json +++ b/apps/billets-app/package.json @@ -1,6 +1,6 @@ { "name": "@coldsurfers/billets-app", - "version": "1.6.7", + "version": "1.6.8", "private": true, "scripts": { "android": "react-native run-android", From a0c13b86b9c762ded3624a52e9fc05f949b1c502 Mon Sep 17 00:00:00 2001 From: yungblud Date: Sun, 2 Feb 2025 12:02:06 +0900 Subject: [PATCH 02/41] feat(billets-app): :art: modified colors --- .../concert-detail-section-list-item.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/billets-app/src/features/concert-detail/ui/concert-detail-section-list-item/concert-detail-section-list-item.tsx b/apps/billets-app/src/features/concert-detail/ui/concert-detail-section-list-item/concert-detail-section-list-item.tsx index 0ff1b583..7fd50403 100644 --- a/apps/billets-app/src/features/concert-detail/ui/concert-detail-section-list-item/concert-detail-section-list-item.tsx +++ b/apps/billets-app/src/features/concert-detail/ui/concert-detail-section-list-item/concert-detail-section-list-item.tsx @@ -34,7 +34,15 @@ ConcertDetailSectionListItem.DateItem = ({ date, isKOPIS }: ConcertDetailSection {format(new Date(date ?? ''), 'MMM dd, hh:mm a')} {isKOPIS ? ( - + {KOPIS_COPYRIGHT_TEXT} ) : null} @@ -277,6 +285,5 @@ const styles = StyleSheet.create({ fontSize: 12, paddingHorizontal: 12, marginVertical: 8, - color: colors.oc.gray[3].value, }, }) From f432893ffa095b5b7687db85f4a3940c90558d07 Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 10 Feb 2025 12:47:04 +0900 Subject: [PATCH 03/41] feat(billets-app): :art: updated open api client --- .../billets-app/src/lib/api/openapi-client.ts | 19 ++++++++++++++++ .../search-bottom-keyword-result-list.tsx | 22 ++++++------------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/apps/billets-app/src/lib/api/openapi-client.ts b/apps/billets-app/src/lib/api/openapi-client.ts index 7fc24a99..3e312834 100644 --- a/apps/billets-app/src/lib/api/openapi-client.ts +++ b/apps/billets-app/src/lib/api/openapi-client.ts @@ -418,4 +418,23 @@ export const apiClient = { return response.data }, }, + search: { + queryKeys: { + all: ['v1', 'search'], + list: (keyword: string) => ['v1', 'search', { keyword }], + }, + getSearchResult: async (keyword: string) => { + const response = await fetchClient.GET('/v1/search/', { + params: { + query: { + keyword, + }, + }, + }) + if (response.error) { + throw new OpenApiError(response.error) + } + return response.data + }, + }, } diff --git a/apps/billets-app/src/ui/search-bottom-keyword-result-list/search-bottom-keyword-result-list.tsx b/apps/billets-app/src/ui/search-bottom-keyword-result-list/search-bottom-keyword-result-list.tsx index c1a2efe2..7841b30c 100644 --- a/apps/billets-app/src/ui/search-bottom-keyword-result-list/search-bottom-keyword-result-list.tsx +++ b/apps/billets-app/src/ui/search-bottom-keyword-result-list/search-bottom-keyword-result-list.tsx @@ -1,9 +1,10 @@ import { useKeyboard } from '@/lib' -import { $api } from '@/lib/api/openapi-client' +import { apiClient } from '@/lib/api/openapi-client' import { useSearchScreenNavigation } from '@/screens/search-screen/search-screen.hooks' import { ProfileThumbnail, useColorScheme } from '@coldsurfers/ocean-road/native' import { BottomSheetFlatList } from '@gorhom/bottom-sheet' import { useFocusEffect } from '@react-navigation/native' +import { useQuery } from '@tanstack/react-query' import format from 'date-fns/format' import { useCallback, useMemo } from 'react' import { ListRenderItem, StyleSheet } from 'react-native' @@ -22,20 +23,11 @@ export const SearchBottomKeywordResultList = ({ keyword }: { keyword: string }) data: searchData, isLoading: isLoadingSearch, isFetched: isFetchedSearch, - } = $api.useQuery( - 'get', - '/v1/search/', - { - params: { - query: { - keyword, - }, - }, - }, - { - enabled: !!keyword, - }, - ) + } = useQuery({ + queryKey: apiClient.search.queryKeys.list(keyword), + queryFn: () => apiClient.search.getSearchResult(keyword), + enabled: !!keyword, + }) const searchResultUIData = useMemo(() => { return searchData ?? [] From b3f6fbad9644016b3f5793ff6d3b03493a7700b0 Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 10 Feb 2025 15:08:23 +0900 Subject: [PATCH 04/41] feat(billets-app): :package: installed repack v5 --- apps/billets-app/ios/Podfile.lock | 35 +++ apps/billets-app/package.json | 1 + yarn.lock | 463 +++++++++++++++++++++++++++++- 3 files changed, 488 insertions(+), 11 deletions(-) diff --git a/apps/billets-app/ios/Podfile.lock b/apps/billets-app/ios/Podfile.lock index 0c1c3ba0..8ffc9a1c 100644 --- a/apps/billets-app/ios/Podfile.lock +++ b/apps/billets-app/ios/Podfile.lock @@ -7,6 +7,29 @@ PODS: - AppAuth/Core - Base64 (1.1.2) - boost (1.84.0) + - callstack-repack (5.0.0-rc.10): + - DoubleConversion + - glog + - hermes-engine + - JWTDecode (~> 3.0.0) + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - SwiftyRSA (~> 1.7) + - Yoga - CodePush (9.0.0): - Base64 (~> 1.1) - JWT (~> 3.0.0-beta.12) @@ -169,6 +192,7 @@ PODS: - hermes-engine/Pre-built (0.75.3) - JWT (3.0.0-beta.14): - Base64 (~> 1.1.2) + - JWTDecode (3.0.1) - libwebp (1.3.2): - libwebp/demux (= 1.3.2) - libwebp/mux (= 1.3.2) @@ -1941,10 +1965,14 @@ PODS: - SDWebImage/Core (~> 5.10) - SocketRocket (0.7.0) - SSZipArchive (2.5.5) + - SwiftyRSA (1.7.0): + - SwiftyRSA/ObjC (= 1.7.0) + - SwiftyRSA/ObjC (1.7.0) - Yoga (0.0.0) DEPENDENCIES: - boost (from `../../../node_modules/react-native/third-party-podspecs/boost.podspec`) + - "callstack-repack (from `../../../node_modules/@callstack/repack`)" - CodePush (from `../../../node_modules/react-native-code-push`) - DoubleConversion (from `../../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../../../node_modules/react-native/Libraries/FBLazyVector`) @@ -2063,6 +2091,7 @@ SPEC REPOS: - GTMAppAuth - GTMSessionFetcher - JWT + - JWTDecode - libwebp - MMKV - MMKVCore @@ -2073,10 +2102,13 @@ SPEC REPOS: - SDWebImageWebPCoder - SocketRocket - SSZipArchive + - SwiftyRSA EXTERNAL SOURCES: boost: :podspec: "../../../node_modules/react-native/third-party-podspecs/boost.podspec" + callstack-repack: + :path: "../../../node_modules/@callstack/repack" CodePush: :path: "../../../node_modules/react-native-code-push" DoubleConversion: @@ -2259,6 +2291,7 @@ SPEC CHECKSUMS: AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa Base64: cecfb41a004124895a7bcee567a89bae5a89d49b boost: 4cb898d0bf20404aab1850c656dcea009429d6c1 + callstack-repack: bcb221c6d821b62cc0e2e0dd20278fad09a15e37 CodePush: ea174f879b85dff65380bee54243bbe523ea16b2 DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 FBLazyVector: 7b438dceb9f904bd85ca3c31d64cce32a035472b @@ -2284,6 +2317,7 @@ SPEC CHECKSUMS: GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2 hermes-engine: 8d2103d6c0176779aea4e25df6bb1410f9946680 JWT: ef71dfb03e1f842081e64dc42eef0e164f35d251 + JWTDecode: 2eed97c2fa46ccaf3049a787004eedf0be474a87 libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009 MMKV: f7d1d5945c8765f97f39c3d121f353d46735d801 MMKVCore: c04b296010fcb1d1638f2c69405096aac12f6390 @@ -2375,6 +2409,7 @@ SPEC CHECKSUMS: SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d SSZipArchive: c69881e8ac5521f0e622291387add5f60f30f3c4 + SwiftyRSA: 8c6dd1ea7db1b8dc4fb517a202f88bb1354bc2c6 Yoga: 33604ac44957ebe3f30f15b4cd0a3f96634e624a PODFILE CHECKSUM: 251d16daf60694f87f9e77bbffc7e5631eee0d39 diff --git a/apps/billets-app/package.json b/apps/billets-app/package.json index ccc9bb50..92f69c2a 100644 --- a/apps/billets-app/package.json +++ b/apps/billets-app/package.json @@ -88,6 +88,7 @@ "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", + "@callstack/repack": "5.0.0-rc.10", "@react-native/babel-preset": "0.75.3", "@react-native/eslint-config": "0.75.3", "@react-native/metro-config": "0.75.3", diff --git a/yarn.lock b/yarn.lock index 9573a297..760b5b62 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2116,7 +2116,7 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.5.5, @babel/code-frame@npm:^7.8.3": +"@babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.5.5, @babel/code-frame@npm:^7.8.3": version: 7.26.2 resolution: "@babel/code-frame@npm:7.26.2" dependencies: @@ -3899,6 +3899,70 @@ __metadata: languageName: node linkType: hard +"@callstack/repack-dev-server@npm:5.0.0-rc.10": + version: 5.0.0-rc.10 + resolution: "@callstack/repack-dev-server@npm:5.0.0-rc.10" + dependencies: + "@babel/code-frame": "npm:^7.16.7" + "@fastify/middie": "npm:^8.3.0" + "@fastify/sensible": "npm:^5.5.0" + "@react-native/dev-middleware": "npm:^0.76.1" + fastify: "npm:^4.24.3" + fastify-favicon: "npm:^4.3.0" + fastify-plugin: "npm:^4.5.1" + pretty-format: "npm:^28.1.0" + source-map: "npm:^0.7.4" + ws: "npm:^8.7.0" + peerDependencies: + "@react-native-community/cli-server-api": ">=13.6.4" + peerDependenciesMeta: + "@react-native-community/cli-server-api": + optional: true + checksum: 10c0/d24ee1fa693616e7fb87a3db363d88dd396a07e458d8acb85263b260434f2d946e67dd890b3bee45401377bab515efacf49b0aad4413566699c4406bec099e1e + languageName: node + linkType: hard + +"@callstack/repack@npm:5.0.0-rc.10": + version: 5.0.0-rc.10 + resolution: "@callstack/repack@npm:5.0.0-rc.10" + dependencies: + "@callstack/repack-dev-server": "npm:5.0.0-rc.10" + "@discoveryjs/json-ext": "npm:^0.5.7" + "@rspack/plugin-react-refresh": "npm:1.0.0" + babel-loader: "npm:^9.2.1" + colorette: "npm:^2.0.20" + dedent: "npm:^0.7.0" + estree-util-is-identifier-name: "npm:^1.1.0" + events: "npm:^3.3.0" + execa: "npm:^5.0.0" + flow-remove-types: "npm:^2.250.0" + image-size: "npm:^1.1.1" + jsonwebtoken: "npm:^9.0.2" + memfs: "npm:^4.11.1" + mime-types: "npm:^2.1.35" + pretty-format: "npm:^26.6.2" + react-refresh: "npm:^0.14.0" + schema-utils: "npm:^4.2.0" + shallowequal: "npm:^1.1.0" + throttleit: "npm:^2.1.0" + peerDependencies: + "@module-federation/enhanced": ">=0.6.10" + "@react-native-community/cli": "*" + "@react-native-community/cli-types": "*" + "@rspack/core": ">=1" + react-native: ">=0.74" + webpack: ">=5.90" + peerDependenciesMeta: + "@module-federation/enhanced": + optional: true + "@rspack/core": + optional: true + webpack: + optional: true + checksum: 10c0/0be0428fcdd038c17779f728152113489c7e4b7efffeb06b9ee774d2b5fc401981eab1a7527e24c72483f883b4cce33dc243bdbf1d6e506eede3f3f7d6c8ba3f + languageName: node + linkType: hard + "@cnakazawa/watch@npm:^1.0.3": version: 1.0.4 resolution: "@cnakazawa/watch@npm:1.0.4" @@ -3918,6 +3982,7 @@ __metadata: "@babel/core": "npm:^7.20.0" "@babel/preset-env": "npm:^7.20.0" "@babel/runtime": "npm:^7.20.0" + "@callstack/repack": "npm:5.0.0-rc.10" "@coldsurfers/ocean-road": "workspace:*" "@emotion/native": "npm:*" "@emotion/react": "npm:*" @@ -4747,7 +4812,7 @@ __metadata: languageName: node linkType: hard -"@discoveryjs/json-ext@npm:^0.5.3": +"@discoveryjs/json-ext@npm:^0.5.3, @discoveryjs/json-ext@npm:^0.5.7": version: 0.5.7 resolution: "@discoveryjs/json-ext@npm:0.5.7" checksum: 10c0/e10f1b02b78e4812646ddf289b7d9f2cb567d336c363b266bd50cd223cf3de7c2c74018d91cd2613041568397ef3a4a2b500aba588c6e5bd78c38374ba68f38c @@ -5524,6 +5589,13 @@ __metadata: languageName: node linkType: hard +"@fastify/error@npm:^3.2.0": + version: 3.4.1 + resolution: "@fastify/error@npm:3.4.1" + checksum: 10c0/1f1a0faa8c86639afb6f4bd47a9cdc1f0f20ce0d6944340fbdec8218aaba91dc9cae9ed78e24e61bceb782a867efda2b9a6320091f00dcbb896d9c8a9bdf5f96 + languageName: node + linkType: hard + "@fastify/error@npm:^4.0.0": version: 4.0.0 resolution: "@fastify/error@npm:4.0.0" @@ -5562,6 +5634,18 @@ __metadata: languageName: node linkType: hard +"@fastify/middie@npm:^8.3.0": + version: 8.3.3 + resolution: "@fastify/middie@npm:8.3.3" + dependencies: + "@fastify/error": "npm:^3.2.0" + fastify-plugin: "npm:^4.0.0" + path-to-regexp: "npm:^6.3.0" + reusify: "npm:^1.0.4" + checksum: 10c0/802a1a51d25d2651fcdd223f058530cad8c8b55a9adb764bd47e55e4656d1c4b3ce71a58fe40c8307ddef56750ce0ba93b9df14ead5d01e2a6590b677ec393ab + languageName: node + linkType: hard + "@fastify/rate-limit@npm:^10.2.1": version: 10.2.1 resolution: "@fastify/rate-limit@npm:10.2.1" @@ -5586,6 +5670,21 @@ __metadata: languageName: node linkType: hard +"@fastify/sensible@npm:^5.5.0": + version: 5.6.0 + resolution: "@fastify/sensible@npm:5.6.0" + dependencies: + "@lukeed/ms": "npm:^2.0.1" + fast-deep-equal: "npm:^3.1.1" + fastify-plugin: "npm:^4.0.0" + forwarded: "npm:^0.2.0" + http-errors: "npm:^2.0.0" + type-is: "npm:^1.6.18" + vary: "npm:^1.1.2" + checksum: 10c0/de10e57a029c27fdc581f8c4a08cb4ab50c36cda3dc4ecdf08051335b48a82b74db2bc7ec69b51ab5fc348b60b18ff3f663eb39ce3d08061733f92bb0cd6b924 + languageName: node + linkType: hard + "@fastify/static@npm:^8.0.0": version: 8.0.2 resolution: "@fastify/static@npm:8.0.2" @@ -8151,6 +8250,15 @@ __metadata: languageName: node linkType: hard +"@jest/schemas@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/schemas@npm:28.1.3" + dependencies: + "@sinclair/typebox": "npm:^0.24.1" + checksum: 10c0/8c325918f3e1b83e687987b05c2e5143d171f372b091f891fe17835f06fadd864ddae3c7e221a704bdd7e2ea28c4b337124c02023d8affcbdd51eca2879162ac + languageName: node + linkType: hard + "@jest/schemas@npm:^29.6.3": version: 29.6.3 resolution: "@jest/schemas@npm:29.6.3" @@ -8355,6 +8463,38 @@ __metadata: languageName: node linkType: hard +"@jsonjoy.com/base64@npm:^1.1.1": + version: 1.1.2 + resolution: "@jsonjoy.com/base64@npm:1.1.2" + peerDependencies: + tslib: 2 + checksum: 10c0/88717945f66dc89bf58ce75624c99fe6a5c9a0c8614e26d03e406447b28abff80c69fb37dabe5aafef1862cf315071ae66e5c85f6018b437d95f8d13d235e6eb + languageName: node + linkType: hard + +"@jsonjoy.com/json-pack@npm:^1.0.3": + version: 1.1.1 + resolution: "@jsonjoy.com/json-pack@npm:1.1.1" + dependencies: + "@jsonjoy.com/base64": "npm:^1.1.1" + "@jsonjoy.com/util": "npm:^1.1.2" + hyperdyperid: "npm:^1.2.0" + thingies: "npm:^1.20.0" + peerDependencies: + tslib: 2 + checksum: 10c0/fd0d8baa0c8eba536924540717901e0d7eed742576991033cceeb32dcce801ee0a4318cf6eb40b444c9e78f69ddbd4f38b9eb0041e9e54c17e7b6d1219b12e1d + languageName: node + linkType: hard + +"@jsonjoy.com/util@npm:^1.1.2, @jsonjoy.com/util@npm:^1.3.0": + version: 1.5.0 + resolution: "@jsonjoy.com/util@npm:1.5.0" + peerDependencies: + tslib: 2 + checksum: 10c0/0065ae12c4108d8aede01a479c8d2b5a39bce99e9a449d235befc753f57e8385d9c1115720529f26597840b7398d512898155423d9859fd638319fb0c827365d + languageName: node + linkType: hard + "@ljharb/through@npm:^2.3.13": version: 2.3.13 resolution: "@ljharb/through@npm:2.3.13" @@ -9921,6 +10061,13 @@ __metadata: languageName: node linkType: hard +"@react-native/debugger-frontend@npm:0.76.7": + version: 0.76.7 + resolution: "@react-native/debugger-frontend@npm:0.76.7" + checksum: 10c0/eee8c72e5d03bd6ed705fddd464f95dda09d79d01f1a846388f67eabebd43b568625eb5b4e8cd932ef10e392ab90fedf51a1e9f811ed11ed445051f3712c25bb + languageName: node + linkType: hard + "@react-native/dev-middleware@npm:0.75.3": version: 0.75.3 resolution: "@react-native/dev-middleware@npm:0.75.3" @@ -9941,6 +10088,26 @@ __metadata: languageName: node linkType: hard +"@react-native/dev-middleware@npm:^0.76.1": + version: 0.76.7 + resolution: "@react-native/dev-middleware@npm:0.76.7" + dependencies: + "@isaacs/ttlcache": "npm:^1.4.1" + "@react-native/debugger-frontend": "npm:0.76.7" + chrome-launcher: "npm:^0.15.2" + chromium-edge-launcher: "npm:^0.2.0" + connect: "npm:^3.6.5" + debug: "npm:^2.2.0" + invariant: "npm:^2.2.4" + nullthrows: "npm:^1.1.1" + open: "npm:^7.0.3" + selfsigned: "npm:^2.4.1" + serve-static: "npm:^1.13.1" + ws: "npm:^6.2.3" + checksum: 10c0/e9f8be47f487ffc36e6465f28c3034b8dd33c6a343f8124c7d4086b769a72ac4e38c7653baf43836e9a7c8c47e9e09028bf29b831eed0c84e8a7bab3d64f5f09 + languageName: node + linkType: hard + "@react-native/eslint-config@npm:0.75.3": version: 0.75.3 resolution: "@react-native/eslint-config@npm:0.75.3" @@ -10505,6 +10672,21 @@ __metadata: languageName: node linkType: hard +"@rspack/plugin-react-refresh@npm:1.0.0": + version: 1.0.0 + resolution: "@rspack/plugin-react-refresh@npm:1.0.0" + dependencies: + error-stack-parser: "npm:^2.0.6" + html-entities: "npm:^2.1.0" + peerDependencies: + react-refresh: ">=0.10.0 <1.0.0" + peerDependenciesMeta: + react-refresh: + optional: true + checksum: 10c0/f40752b6f5757be59c99b2ac2b449ac4fd2d394f4330a75151b99eb6566ade22cd9a2f5f359588cb5787703c6ec4ee30037ffe40b59dacf5826c82038a09c0cd + languageName: node + linkType: hard + "@rtsao/scc@npm:^1.1.0": version: 1.1.0 resolution: "@rtsao/scc@npm:1.1.0" @@ -10542,6 +10724,13 @@ __metadata: languageName: node linkType: hard +"@sinclair/typebox@npm:^0.24.1": + version: 0.24.51 + resolution: "@sinclair/typebox@npm:0.24.51" + checksum: 10c0/458131e83ca59ad3721f0abeef2aa5220aff2083767e1143d75c67c85d55ef7a212f48f394471ee6bdd2e860ba30f09a489cdd2a28a2824d5b0d1014bdfb2552 + languageName: node + linkType: hard + "@sinclair/typebox@npm:^0.27.8": version: 0.27.8 resolution: "@sinclair/typebox@npm:0.27.8" @@ -16775,6 +16964,19 @@ __metadata: languageName: node linkType: hard +"babel-loader@npm:^9.2.1": + version: 9.2.1 + resolution: "babel-loader@npm:9.2.1" + dependencies: + find-cache-dir: "npm:^4.0.0" + schema-utils: "npm:^4.0.0" + peerDependencies: + "@babel/core": ^7.12.0 + webpack: ">=5" + checksum: 10c0/efb82faff4c7c27e9c15bb28bf11c73200e61cf365118a9514e8d74dd489d0afc2a0d5aaa62cb4254eefc2ab631579224d95a03fd245410f28ea75e24de54ba4 + languageName: node + linkType: hard + "babel-plugin-add-react-displayname@npm:^0.0.5": version: 0.0.5 resolution: "babel-plugin-add-react-displayname@npm:0.0.5" @@ -18764,6 +18966,13 @@ __metadata: languageName: node linkType: hard +"common-path-prefix@npm:^3.0.0": + version: 3.0.0 + resolution: "common-path-prefix@npm:3.0.0" + checksum: 10c0/c4a74294e1b1570f4a8ab435285d185a03976c323caa16359053e749db4fde44e3e6586c29cd051100335e11895767cbbd27ea389108e327d62f38daf4548fdb + languageName: node + linkType: hard + "common-tags@npm:1.8.2": version: 1.8.2 resolution: "common-tags@npm:1.8.2" @@ -21948,6 +22157,13 @@ __metadata: languageName: node linkType: hard +"estree-util-is-identifier-name@npm:^1.1.0": + version: 1.1.0 + resolution: "estree-util-is-identifier-name@npm:1.1.0" + checksum: 10c0/4984c705638594d651ea090b3da8c0726da67790cea661dd56540e0f16e1bb07fb0c3a96b8f8cd625d5d28da3184340ffd815fea82cb130dc3d558db023b508c + languageName: node + linkType: hard + "estree-walker@npm:^2.0.2": version: 2.0.2 resolution: "estree-walker@npm:2.0.2" @@ -22011,7 +22227,7 @@ __metadata: languageName: node linkType: hard -"events@npm:^3.0.0, events@npm:^3.2.0": +"events@npm:^3.0.0, events@npm:^3.2.0, events@npm:^3.3.0": version: 3.3.0 resolution: "events@npm:3.3.0" checksum: 10c0/d6b6f2adbccbcda74ddbab52ed07db727ef52e31a61ed26db9feb7dc62af7fc8e060defa65e5f8af9449b86b52cc1a1f6a79f2eafcf4e62add2b7a1fa4a432f6 @@ -22479,7 +22695,16 @@ __metadata: languageName: node linkType: hard -"fastify-plugin@npm:^4.4.0": +"fastify-favicon@npm:^4.3.0": + version: 4.3.0 + resolution: "fastify-favicon@npm:4.3.0" + dependencies: + fastify-plugin: "npm:^4.5.0" + checksum: 10c0/e5ccff6acbcb2e41b36d4fb9f28df9cc9a71e231dc019e3dc2e04badc3129319f3acc8fa573824a86567950abfde6355bce192839eb3eae4f0f72331d65ea308 + languageName: node + linkType: hard + +"fastify-plugin@npm:^4.0.0, fastify-plugin@npm:^4.4.0, fastify-plugin@npm:^4.5.0, fastify-plugin@npm:^4.5.1": version: 4.5.1 resolution: "fastify-plugin@npm:4.5.1" checksum: 10c0/f58f79cd9d3c88fd7f79a3270276c6339fc57bbe72ef14d20b73779193c404e317ac18e8eae2c5071b3909ebee45d7eb6871da4e65464ac64ed0d9746b4e9b9f @@ -22808,6 +23033,16 @@ __metadata: languageName: node linkType: hard +"find-cache-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "find-cache-dir@npm:4.0.0" + dependencies: + common-path-prefix: "npm:^3.0.0" + pkg-dir: "npm:^7.0.0" + checksum: 10c0/0faa7956974726c8769671de696d24c643ca1e5b8f7a2401283caa9e07a5da093293e0a0f4bd18c920ec981d2ef945c7f5b946cde268dfc9077d833ad0293cff + languageName: node + linkType: hard + "find-my-way@npm:^9.0.0": version: 9.1.0 resolution: "find-my-way@npm:9.1.0" @@ -22865,6 +23100,16 @@ __metadata: languageName: node linkType: hard +"find-up@npm:^6.3.0": + version: 6.3.0 + resolution: "find-up@npm:6.3.0" + dependencies: + locate-path: "npm:^7.1.0" + path-exists: "npm:^5.0.0" + checksum: 10c0/07e0314362d316b2b13f7f11ea4692d5191e718ca3f7264110127520f3347996349bf9e16805abae3e196805814bc66ef4bff2b8904dc4a6476085fc9b0eba07 + languageName: node + linkType: hard + "find-yarn-workspace-root@npm:^2.0.0": version: 2.0.0 resolution: "find-yarn-workspace-root@npm:2.0.0" @@ -22986,6 +23231,20 @@ __metadata: languageName: node linkType: hard +"flow-remove-types@npm:^2.250.0": + version: 2.259.1 + resolution: "flow-remove-types@npm:2.259.1" + dependencies: + hermes-parser: "npm:0.25.1" + pirates: "npm:^3.0.2" + vlq: "npm:^0.2.1" + bin: + flow-node: flow-node + flow-remove-types: flow-remove-types + checksum: 10c0/412bc54c76b649ba0528fbff914a7b672c58f6831ca4dc4ba8233f625ce9bcf593869da18c8d19d7662586752667e9394332ed2ad956e6a5297a62d013404441 + languageName: node + linkType: hard + "flush-write-stream@npm:^1.0.0": version: 1.1.1 resolution: "flush-write-stream@npm:1.1.1" @@ -23163,7 +23422,7 @@ __metadata: languageName: node linkType: hard -"forwarded@npm:0.2.0": +"forwarded@npm:0.2.0, forwarded@npm:^0.2.0": version: 0.2.0 resolution: "forwarded@npm:0.2.0" checksum: 10c0/9b67c3fac86acdbc9ae47ba1ddd5f2f81526fa4c8226863ede5600a3f7c7416ef451f6f1e240a3cc32d0fd79fcfe6beb08fd0da454f360032bde70bf80afbb33 @@ -24439,6 +24698,13 @@ __metadata: languageName: node linkType: hard +"hermes-estree@npm:0.25.1": + version: 0.25.1 + resolution: "hermes-estree@npm:0.25.1" + checksum: 10c0/48be3b2fa37a0cbc77a112a89096fa212f25d06de92781b163d67853d210a8a5c3784fac23d7d48335058f7ed283115c87b4332c2a2abaaccc76d0ead1a282ac + languageName: node + linkType: hard + "hermes-parser@npm:0.22.0": version: 0.22.0 resolution: "hermes-parser@npm:0.22.0" @@ -24457,6 +24723,15 @@ __metadata: languageName: node linkType: hard +"hermes-parser@npm:0.25.1": + version: 0.25.1 + resolution: "hermes-parser@npm:0.25.1" + dependencies: + hermes-estree: "npm:0.25.1" + checksum: 10c0/3abaa4c6f1bcc25273f267297a89a4904963ea29af19b8e4f6eabe04f1c2c7e9abd7bfc4730ddb1d58f2ea04b6fee74053d8bddb5656ec6ebf6c79cc8d14202c + languageName: node + linkType: hard + "hexoid@npm:^1.0.0": version: 1.0.0 resolution: "hexoid@npm:1.0.0" @@ -24819,6 +25094,13 @@ __metadata: languageName: node linkType: hard +"hyperdyperid@npm:^1.2.0": + version: 1.2.0 + resolution: "hyperdyperid@npm:1.2.0" + checksum: 10c0/885ba3177c7181d315a856ee9c0005ff8eb5dcb1ce9e9d61be70987895d934d84686c37c981cceeb53216d4c9c15c1cc25f1804e84cc6a74a16993c5d7fd0893 + languageName: node + linkType: hard + "hyphenate-style-name@npm:^1.0.3": version: 1.1.0 resolution: "hyphenate-style-name@npm:1.1.0" @@ -24915,6 +25197,17 @@ __metadata: languageName: node linkType: hard +"image-size@npm:^1.1.1": + version: 1.2.0 + resolution: "image-size@npm:1.2.0" + dependencies: + queue: "npm:6.0.2" + bin: + image-size: bin/image-size.js + checksum: 10c0/782669b530d9bbdcb334c8451db5f104dfbbcf90940751e6b75ba4e1b86d98bf3127c339eac8fb7a25c7a9ec4ea868d27b4916df3943c269b7419a8cc4459dca + languageName: node + linkType: hard + "image-size@npm:~0.5.0": version: 0.5.5 resolution: "image-size@npm:0.5.5" @@ -27100,7 +27393,7 @@ __metadata: languageName: node linkType: hard -"jsonwebtoken@npm:^9.0.0": +"jsonwebtoken@npm:^9.0.0, jsonwebtoken@npm:^9.0.2": version: 9.0.2 resolution: "jsonwebtoken@npm:9.0.2" dependencies: @@ -27627,6 +27920,15 @@ __metadata: languageName: node linkType: hard +"locate-path@npm:^7.1.0": + version: 7.2.0 + resolution: "locate-path@npm:7.2.0" + dependencies: + p-locate: "npm:^6.0.0" + checksum: 10c0/139e8a7fe11cfbd7f20db03923cacfa5db9e14fa14887ea121345597472b4a63c1a42a8a5187defeeff6acf98fd568da7382aa39682d38f0af27433953a97751 + languageName: node + linkType: hard + "lodash.camelcase@npm:^4.3.0": version: 4.3.0 resolution: "lodash.camelcase@npm:4.3.0" @@ -28276,6 +28578,18 @@ __metadata: languageName: node linkType: hard +"memfs@npm:^4.11.1": + version: 4.17.0 + resolution: "memfs@npm:4.17.0" + dependencies: + "@jsonjoy.com/json-pack": "npm:^1.0.3" + "@jsonjoy.com/util": "npm:^1.3.0" + tree-dump: "npm:^1.0.1" + tslib: "npm:^2.0.0" + checksum: 10c0/2901f69e80e1fbefa8aafe994a253fff6f34eb176d8b80d57476311611e516a11ab4dd93f852c8739fe04f2b57d6a4ca7a1828fa0bd401ce631bcac214b3d58b + languageName: node + linkType: hard + "memoize-one@npm:^5.0.0, memoize-one@npm:^5.2.1": version: 5.2.1 resolution: "memoize-one@npm:5.2.1" @@ -28826,7 +29140,7 @@ __metadata: languageName: node linkType: hard -"mime-types@npm:2.1.35, mime-types@npm:^2.1.12, mime-types@npm:^2.1.27, mime-types@npm:^2.1.30, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": +"mime-types@npm:2.1.35, mime-types@npm:^2.1.12, mime-types@npm:^2.1.27, mime-types@npm:^2.1.30, mime-types@npm:^2.1.35, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": version: 2.1.35 resolution: "mime-types@npm:2.1.35" dependencies: @@ -29886,6 +30200,13 @@ __metadata: languageName: node linkType: hard +"node-modules-regexp@npm:^1.0.0": + version: 1.0.0 + resolution: "node-modules-regexp@npm:1.0.0" + checksum: 10c0/d4a9b6425a18e9fadd38f21a7f7820b3bfda4663c7d3b9f80043e3f5f7e27a0a1e04f524077b00a15ae77148cd81319da5772900229d89541062f7e876b36763 + languageName: node + linkType: hard + "node-releases@npm:^2.0.18": version: 2.0.18 resolution: "node-releases@npm:2.0.18" @@ -30668,6 +30989,15 @@ __metadata: languageName: node linkType: hard +"p-limit@npm:^4.0.0": + version: 4.0.0 + resolution: "p-limit@npm:4.0.0" + dependencies: + yocto-queue: "npm:^1.0.0" + checksum: 10c0/a56af34a77f8df2ff61ddfb29431044557fcbcb7642d5a3233143ebba805fc7306ac1d448de724352861cb99de934bc9ab74f0d16fe6a5460bdbdf938de875ad + languageName: node + linkType: hard + "p-locate@npm:^3.0.0": version: 3.0.0 resolution: "p-locate@npm:3.0.0" @@ -30695,6 +31025,15 @@ __metadata: languageName: node linkType: hard +"p-locate@npm:^6.0.0": + version: 6.0.0 + resolution: "p-locate@npm:6.0.0" + dependencies: + p-limit: "npm:^4.0.0" + checksum: 10c0/d72fa2f41adce59c198270aa4d3c832536c87a1806e0f69dffb7c1a7ca998fb053915ca833d90f166a8c082d3859eabfed95f01698a3214c20df6bb8de046312 + languageName: node + linkType: hard + "p-map@npm:^2.0.0": version: 2.1.0 resolution: "p-map@npm:2.1.0" @@ -31108,6 +31447,13 @@ __metadata: languageName: node linkType: hard +"path-exists@npm:^5.0.0": + version: 5.0.0 + resolution: "path-exists@npm:5.0.0" + checksum: 10c0/b170f3060b31604cde93eefdb7392b89d832dfbc1bed717c9718cbe0f230c1669b7e75f87e19901da2250b84d092989a0f9e44d2ef41deb09aa3ad28e691a40a + languageName: node + linkType: hard + "path-is-absolute@npm:^1.0.0": version: 1.0.1 resolution: "path-is-absolute@npm:1.0.1" @@ -31186,6 +31532,13 @@ __metadata: languageName: node linkType: hard +"path-to-regexp@npm:^6.3.0": + version: 6.3.0 + resolution: "path-to-regexp@npm:6.3.0" + checksum: 10c0/73b67f4638b41cde56254e6354e46ae3a2ebc08279583f6af3d96fe4664fc75788f74ed0d18ca44fa4a98491b69434f9eee73b97bb5314bd1b5adb700f5c18d6 + languageName: node + linkType: hard + "path-type@npm:^1.0.0": version: 1.1.0 resolution: "path-type@npm:1.1.0" @@ -31391,6 +31744,15 @@ __metadata: languageName: node linkType: hard +"pirates@npm:^3.0.2": + version: 3.0.2 + resolution: "pirates@npm:3.0.2" + dependencies: + node-modules-regexp: "npm:^1.0.0" + checksum: 10c0/f71519f64abff750ad00398e7a0f724e7d3af0ce14c0cf149a47dd9e1fae5e9aea24cb3a63b4ce8dce8b051f7d44531af6743078e33f72cb8602c5a7365185d1 + languageName: node + linkType: hard + "pirates@npm:^4.0.1, pirates@npm:^4.0.4, pirates@npm:^4.0.6": version: 4.0.6 resolution: "pirates@npm:4.0.6" @@ -31425,6 +31787,15 @@ __metadata: languageName: node linkType: hard +"pkg-dir@npm:^7.0.0": + version: 7.0.0 + resolution: "pkg-dir@npm:7.0.0" + dependencies: + find-up: "npm:^6.3.0" + checksum: 10c0/1afb23d2efb1ec9d8b2c4a0c37bf146822ad2774f074cb05b853be5dca1b40815c5960dd126df30ab8908349262a266f31b771e877235870a3b8fd313beebec5 + languageName: node + linkType: hard + "pkg-up@npm:^3.1.0": version: 3.1.0 resolution: "pkg-up@npm:3.1.0" @@ -31900,6 +32271,18 @@ __metadata: languageName: node linkType: hard +"pretty-format@npm:^28.1.0": + version: 28.1.3 + resolution: "pretty-format@npm:28.1.3" + dependencies: + "@jest/schemas": "npm:^28.1.3" + ansi-regex: "npm:^5.0.1" + ansi-styles: "npm:^5.0.0" + react-is: "npm:^18.0.0" + checksum: 10c0/596d8b459b6fdac7dcbd70d40169191e889939c17ffbcc73eebe2a9a6f82cdbb57faffe190274e0a507d9ecdf3affadf8a9b43442a625eecfbd2813b9319660f + languageName: node + linkType: hard + "pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": version: 29.7.0 resolution: "pretty-format@npm:29.7.0" @@ -34603,6 +34986,18 @@ __metadata: languageName: node linkType: hard +"schema-utils@npm:^4.0.0": + version: 4.3.0 + resolution: "schema-utils@npm:4.3.0" + dependencies: + "@types/json-schema": "npm:^7.0.9" + ajv: "npm:^8.9.0" + ajv-formats: "npm:^2.1.1" + ajv-keywords: "npm:^5.1.0" + checksum: 10c0/c23f0fa73ef71a01d4a2bb7af4c91e0d356ec640e071aa2d06ea5e67f042962bb7ac7c29a60a295bb0125878801bc3209197a2b8a833dd25bd38e37c3ed21427 + languageName: node + linkType: hard + "schema-utils@npm:^4.2.0": version: 4.2.0 resolution: "schema-utils@npm:4.2.0" @@ -34954,6 +35349,13 @@ __metadata: languageName: node linkType: hard +"shallowequal@npm:^1.1.0": + version: 1.1.0 + resolution: "shallowequal@npm:1.1.0" + checksum: 10c0/b926efb51cd0f47aa9bc061add788a4a650550bbe50647962113a4579b60af2abe7b62f9b02314acc6f97151d4cf87033a2b15fc20852fae306d1a095215396c + languageName: node + linkType: hard + "sharp@npm:0.33.5, sharp@npm:^0.33.5": version: 0.33.5 resolution: "sharp@npm:0.33.5" @@ -35473,7 +35875,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.7.3": +"source-map@npm:^0.7.3, source-map@npm:^0.7.4": version: 0.7.4 resolution: "source-map@npm:0.7.4" checksum: 10c0/dc0cf3768fe23c345ea8760487f8c97ef6fca8a73c83cd7c9bf2fde8bc2c34adb9c0824d6feb14bc4f9e37fb522e18af621543f1289038a66ac7586da29aa7dc @@ -36849,6 +37251,15 @@ __metadata: languageName: node linkType: hard +"thingies@npm:^1.20.0": + version: 1.21.0 + resolution: "thingies@npm:1.21.0" + peerDependencies: + tslib: ^2 + checksum: 10c0/7570ee855aecb73185a672ecf3eb1c287a6512bf5476449388433b2d4debcf78100bc8bfd439b0edd38d2bc3bfb8341de5ce85b8557dec66d0f27b962c9a8bc1 + languageName: node + linkType: hard + "thread-stream@npm:^3.0.0": version: 3.1.0 resolution: "thread-stream@npm:3.1.0" @@ -36865,6 +37276,13 @@ __metadata: languageName: node linkType: hard +"throttleit@npm:^2.1.0": + version: 2.1.0 + resolution: "throttleit@npm:2.1.0" + checksum: 10c0/1696ae849522cea6ba4f4f3beac1f6655d335e51b42d99215e196a718adced0069e48deaaf77f7e89f526ab31de5b5c91016027da182438e6f9280be2f3d5265 + languageName: node + linkType: hard + "through2@npm:^2.0.0, through2@npm:^2.0.1": version: 2.0.5 resolution: "through2@npm:2.0.5" @@ -37040,6 +37458,15 @@ __metadata: languageName: node linkType: hard +"tree-dump@npm:^1.0.1": + version: 1.0.2 + resolution: "tree-dump@npm:1.0.2" + peerDependencies: + tslib: 2 + checksum: 10c0/d1d180764e9c691b28332dbd74226c6b6af361dfb1e134bb11e60e17cb11c215894adee50ffc578da5dcf546006693947be8b6665eb1269b56e2f534926f1c1f + languageName: node + linkType: hard + "tree-kill@npm:^1.2.2": version: 1.2.2 resolution: "tree-kill@npm:1.2.2" @@ -37498,7 +37925,7 @@ __metadata: languageName: node linkType: hard -"type-is@npm:~1.6.18": +"type-is@npm:^1.6.18, type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" dependencies: @@ -38330,7 +38757,7 @@ __metadata: languageName: node linkType: hard -"vary@npm:^1, vary@npm:~1.1.2": +"vary@npm:^1, vary@npm:^1.1.2, vary@npm:~1.1.2": version: 1.1.2 resolution: "vary@npm:1.1.2" checksum: 10c0/f15d588d79f3675135ba783c91a4083dcd290a2a5be9fcb6514220a1634e23df116847b1cc51f66bfb0644cf9353b2abb7815ae499bab06e46dd33c1a6bf1f4f @@ -38389,6 +38816,13 @@ __metadata: languageName: node linkType: hard +"vlq@npm:^0.2.1": + version: 0.2.3 + resolution: "vlq@npm:0.2.3" + checksum: 10c0/d1557b404353ca75c7affaaf403d245a3273a7d1c6b3380ed7f04ae3f080e4658f41ac700d6f48acb3cd4875fe7bc7da4924b3572cd5584a5de83b35b1de5e12 + languageName: node + linkType: hard + "vlq@npm:^1.0.0": version: 1.0.1 resolution: "vlq@npm:1.0.1" @@ -39053,7 +39487,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.12.0, ws@npm:^8.18.0, ws@npm:^8.2.3": +"ws@npm:^8.12.0, ws@npm:^8.18.0, ws@npm:^8.2.3, ws@npm:^8.7.0": version: 8.18.0 resolution: "ws@npm:8.18.0" peerDependencies: @@ -39350,6 +39784,13 @@ __metadata: languageName: node linkType: hard +"yocto-queue@npm:^1.0.0": + version: 1.1.1 + resolution: "yocto-queue@npm:1.1.1" + checksum: 10c0/cb287fe5e6acfa82690acb43c283de34e945c571a78a939774f6eaba7c285bacdf6c90fbc16ce530060863984c906d2b4c6ceb069c94d1e0a06d5f2b458e2a92 + languageName: node + linkType: hard + "zen-observable-ts@npm:^1.2.5": version: 1.2.5 resolution: "zen-observable-ts@npm:1.2.5" From af17c4fa5ef32f5859790821334bab89438099f1 Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 10 Feb 2025 15:08:40 +0900 Subject: [PATCH 05/41] feat(billets-app): :package: installed rspack core, swc helpers --- apps/billets-app/package.json | 2 + yarn.lock | 190 +++++++++++++++++++++++++++++++++- 2 files changed, 191 insertions(+), 1 deletion(-) diff --git a/apps/billets-app/package.json b/apps/billets-app/package.json index 92f69c2a..e3837ac5 100644 --- a/apps/billets-app/package.json +++ b/apps/billets-app/package.json @@ -93,6 +93,8 @@ "@react-native/eslint-config": "0.75.3", "@react-native/metro-config": "0.75.3", "@react-native/typescript-config": "0.75.3", + "@rspack/core": "^1.2.2", + "@swc/helpers": "^0.5.15", "@tanstack/eslint-plugin-query": "^5.58.1", "@types/lodash.uniqby": "^4", "@types/ngeohash": "*", diff --git a/yarn.lock b/yarn.lock index 760b5b62..e39da370 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4005,6 +4005,8 @@ __metadata: "@react-navigation/bottom-tabs": "npm:^6.5.11" "@react-navigation/native": "npm:^6.1.9" "@react-navigation/native-stack": "npm:^6.9.17" + "@rspack/core": "npm:^1.2.2" + "@swc/helpers": "npm:^0.5.15" "@tanstack/eslint-plugin-query": "npm:^5.58.1" "@tanstack/react-query": "npm:*" "@types/lodash.uniqby": "npm:^4" @@ -8593,6 +8595,52 @@ __metadata: languageName: node linkType: hard +"@module-federation/error-codes@npm:0.8.4": + version: 0.8.4 + resolution: "@module-federation/error-codes@npm:0.8.4" + checksum: 10c0/970508e4edf0f443eec5c1a82aba342be5235d44dedf2f8d68739151878894afde8f04859fcebff688016e2a369a9f0273171378bc691d002901295afe142bf4 + languageName: node + linkType: hard + +"@module-federation/runtime-tools@npm:0.8.4": + version: 0.8.4 + resolution: "@module-federation/runtime-tools@npm:0.8.4" + dependencies: + "@module-federation/runtime": "npm:0.8.4" + "@module-federation/webpack-bundler-runtime": "npm:0.8.4" + checksum: 10c0/82da5767a7384b898ce988c06434c26280aa0756e07a646ffee0d8da8e1ba2e65d5d55643c522f6d96c2e208b2a50bf57c0fe8769510d7711780f9c65f8ac18f + languageName: node + linkType: hard + +"@module-federation/runtime@npm:0.8.4": + version: 0.8.4 + resolution: "@module-federation/runtime@npm:0.8.4" + dependencies: + "@module-federation/error-codes": "npm:0.8.4" + "@module-federation/sdk": "npm:0.8.4" + checksum: 10c0/916ce10f6c12c2b319a2e20d07dc83baa2630fe591b6fba68453d91bb65b5bafec7370ad814cc4128be92ea9c857d880716e1341d3a74c0d66bcf2f1f7f16ece + languageName: node + linkType: hard + +"@module-federation/sdk@npm:0.8.4": + version: 0.8.4 + resolution: "@module-federation/sdk@npm:0.8.4" + dependencies: + isomorphic-rslog: "npm:0.0.6" + checksum: 10c0/817fb03ae8136e648ce4f6f92419ed47bf1644c7adb744c91ddb7dabf9530e1a293c3012b61f537c401a728b4a2c9029065369e02cb3d7f26bb3b82a45e836be + languageName: node + linkType: hard + +"@module-federation/webpack-bundler-runtime@npm:0.8.4": + version: 0.8.4 + resolution: "@module-federation/webpack-bundler-runtime@npm:0.8.4" + dependencies: + "@module-federation/runtime": "npm:0.8.4" + "@module-federation/sdk": "npm:0.8.4" + checksum: 10c0/3192ef3e08486d17cad5f8a35dd34b6c0f56d4c40097487d1ee59f6a68cc52eb8923927b87f1c1afee27851739b08999cb310643a1bd761c7da936b85b241a7c + languageName: node + linkType: hard + "@mrmlnc/readdir-enhanced@npm:^2.2.1": version: 2.2.1 resolution: "@mrmlnc/readdir-enhanced@npm:2.2.1" @@ -10672,6 +10720,132 @@ __metadata: languageName: node linkType: hard +"@rspack/binding-darwin-arm64@npm:1.2.2": + version: 1.2.2 + resolution: "@rspack/binding-darwin-arm64@npm:1.2.2" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@rspack/binding-darwin-x64@npm:1.2.2": + version: 1.2.2 + resolution: "@rspack/binding-darwin-x64@npm:1.2.2" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@rspack/binding-linux-arm64-gnu@npm:1.2.2": + version: 1.2.2 + resolution: "@rspack/binding-linux-arm64-gnu@npm:1.2.2" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@rspack/binding-linux-arm64-musl@npm:1.2.2": + version: 1.2.2 + resolution: "@rspack/binding-linux-arm64-musl@npm:1.2.2" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@rspack/binding-linux-x64-gnu@npm:1.2.2": + version: 1.2.2 + resolution: "@rspack/binding-linux-x64-gnu@npm:1.2.2" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@rspack/binding-linux-x64-musl@npm:1.2.2": + version: 1.2.2 + resolution: "@rspack/binding-linux-x64-musl@npm:1.2.2" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@rspack/binding-win32-arm64-msvc@npm:1.2.2": + version: 1.2.2 + resolution: "@rspack/binding-win32-arm64-msvc@npm:1.2.2" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@rspack/binding-win32-ia32-msvc@npm:1.2.2": + version: 1.2.2 + resolution: "@rspack/binding-win32-ia32-msvc@npm:1.2.2" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@rspack/binding-win32-x64-msvc@npm:1.2.2": + version: 1.2.2 + resolution: "@rspack/binding-win32-x64-msvc@npm:1.2.2" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@rspack/binding@npm:1.2.2": + version: 1.2.2 + resolution: "@rspack/binding@npm:1.2.2" + dependencies: + "@rspack/binding-darwin-arm64": "npm:1.2.2" + "@rspack/binding-darwin-x64": "npm:1.2.2" + "@rspack/binding-linux-arm64-gnu": "npm:1.2.2" + "@rspack/binding-linux-arm64-musl": "npm:1.2.2" + "@rspack/binding-linux-x64-gnu": "npm:1.2.2" + "@rspack/binding-linux-x64-musl": "npm:1.2.2" + "@rspack/binding-win32-arm64-msvc": "npm:1.2.2" + "@rspack/binding-win32-ia32-msvc": "npm:1.2.2" + "@rspack/binding-win32-x64-msvc": "npm:1.2.2" + dependenciesMeta: + "@rspack/binding-darwin-arm64": + optional: true + "@rspack/binding-darwin-x64": + optional: true + "@rspack/binding-linux-arm64-gnu": + optional: true + "@rspack/binding-linux-arm64-musl": + optional: true + "@rspack/binding-linux-x64-gnu": + optional: true + "@rspack/binding-linux-x64-musl": + optional: true + "@rspack/binding-win32-arm64-msvc": + optional: true + "@rspack/binding-win32-ia32-msvc": + optional: true + "@rspack/binding-win32-x64-msvc": + optional: true + checksum: 10c0/4d9453847808675f0dbcb629b3acee4bda01ce91b4f3b2fbde9f26518535ef9a186bc5623461c2d46c9f311a46397296d8916c524acb5c40b2440867c8ee5ff7 + languageName: node + linkType: hard + +"@rspack/core@npm:^1.2.2": + version: 1.2.2 + resolution: "@rspack/core@npm:1.2.2" + dependencies: + "@module-federation/runtime-tools": "npm:0.8.4" + "@rspack/binding": "npm:1.2.2" + "@rspack/lite-tapable": "npm:1.0.1" + caniuse-lite: "npm:^1.0.30001616" + peerDependencies: + "@rspack/tracing": ^1.x + "@swc/helpers": ">=0.5.1" + peerDependenciesMeta: + "@rspack/tracing": + optional: true + "@swc/helpers": + optional: true + checksum: 10c0/299f0161d5532b784197d632bb12cf996b7504264997de0cf6d72e45ee50ffe29af392899dddfcb4eb48a44199262d1d318d7710a775ae62cba6a374e850ab24 + languageName: node + linkType: hard + +"@rspack/lite-tapable@npm:1.0.1": + version: 1.0.1 + resolution: "@rspack/lite-tapable@npm:1.0.1" + checksum: 10c0/90bb1bc414dc51ea2d0933e09f78d25584f3f50a85f4cb8228930bd29e5931bf55eff4f348a06c51dd3149fc73b8ae3920bf0ae5ae8a0c9fe1d9b404e6ecf5b7 + languageName: node + linkType: hard + "@rspack/plugin-react-refresh@npm:1.0.0": version: 1.0.0 resolution: "@rspack/plugin-react-refresh@npm:1.0.0" @@ -13771,7 +13945,7 @@ __metadata: languageName: node linkType: hard -"@swc/helpers@npm:0.5.15": +"@swc/helpers@npm:0.5.15, @swc/helpers@npm:^0.5.15": version: 0.5.15 resolution: "@swc/helpers@npm:0.5.15" dependencies: @@ -18121,6 +18295,13 @@ __metadata: languageName: node linkType: hard +"caniuse-lite@npm:^1.0.30001616": + version: 1.0.30001699 + resolution: "caniuse-lite@npm:1.0.30001699" + checksum: 10c0/e87b3a0602c3124131f6a21f1eb262378e17a2ee3089e3c472ac8b9caa85cf7d6a219655379302c29c6f10a74051f2a712639d7f98ee0444c73fefcbaf25d519 + languageName: node + linkType: hard + "caniuse-lite@npm:^1.0.30001669": version: 1.0.30001672 resolution: "caniuse-lite@npm:1.0.30001672" @@ -26351,6 +26532,13 @@ __metadata: languageName: node linkType: hard +"isomorphic-rslog@npm:0.0.6": + version: 0.0.6 + resolution: "isomorphic-rslog@npm:0.0.6" + checksum: 10c0/ff702859d804ca13d5ed9f7de1d09a2bcfdb8e1dc8712713c569ea1833ecde1dcd1443057234d61ded22466f1775a2a94c6659d358678343f1efff0b5869e048 + languageName: node + linkType: hard + "isomorphic-unfetch@npm:^3.1.0": version: 3.1.0 resolution: "isomorphic-unfetch@npm:3.1.0" From a95824d5401c27c6deef6c0ab85f5deb07bb1603 Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 10 Feb 2025 15:23:44 +0900 Subject: [PATCH 06/41] feat(billets-app): :art: implemented rspack --- apps/billets-app/app.config.js | 2 +- apps/billets-app/package.json | 2 + apps/billets-app/react-native.config.js | 1 + apps/billets-app/rspack.config.mjs | 124 ++++++++++++++++ apps/billets-server/package.json | 2 +- apps/wamuseum-server/package.json | 2 +- package.json | 1 - yarn.lock | 181 ++++++++++++++++++++++-- 8 files changed, 303 insertions(+), 12 deletions(-) create mode 100644 apps/billets-app/rspack.config.mjs diff --git a/apps/billets-app/app.config.js b/apps/billets-app/app.config.js index 7b817ad4..3356740d 100644 --- a/apps/billets-app/app.config.js +++ b/apps/billets-app/app.config.js @@ -61,4 +61,4 @@ const appConfig = { }, } -module.exports = appConfig +export default appConfig diff --git a/apps/billets-app/package.json b/apps/billets-app/package.json index e3837ac5..e5bfbabc 100644 --- a/apps/billets-app/package.json +++ b/apps/billets-app/package.json @@ -89,6 +89,7 @@ "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@callstack/repack": "5.0.0-rc.10", + "@callstack/repack-plugin-reanimated": "5.0.0-rc.6", "@react-native/babel-preset": "0.75.3", "@react-native/eslint-config": "0.75.3", "@react-native/metro-config": "0.75.3", @@ -105,6 +106,7 @@ "@typescript-eslint/parser": "^5.29.0", "babel-jest": "^29.6.3", "babel-plugin-module-resolver": "^5.0.2", + "babel-plugin-syntax-hermes-parser": "^0.26.0", "detox": "^19.8.1", "eslint": "8.57.0", "eslint-config-prettier": "^9.1.0", diff --git a/apps/billets-app/react-native.config.js b/apps/billets-app/react-native.config.js index ff396767..276eead8 100644 --- a/apps/billets-app/react-native.config.js +++ b/apps/billets-app/react-native.config.js @@ -4,4 +4,5 @@ module.exports = { android: {}, }, assets: ['./assets/fonts/'], + commands: require('@callstack/repack/commands/rspack'), } diff --git a/apps/billets-app/rspack.config.mjs b/apps/billets-app/rspack.config.mjs new file mode 100644 index 00000000..2fb9bb4f --- /dev/null +++ b/apps/billets-app/rspack.config.mjs @@ -0,0 +1,124 @@ +// https://github.com/callstack/repack/blob/2390ead8ae0da12f7af59422b4de6b6162acf635/apps/tester-federation-v2/rspack.config.host-app.mjs +// @ts-check +import * as Repack from '@callstack/repack' +import { ReanimatedPlugin } from '@callstack/repack-plugin-reanimated' +import rspack from '@rspack/core' +import path from 'node:path' + +const dirname = Repack.getDirname(import.meta.url) + +/** @type {(env: import('@callstack/repack').EnvOptions) => import('@rspack/core').Configuration} */ +export default (env) => { + const { + mode = 'development', + context = dirname, + entry = './index.js', + platform = process.env.PLATFORM, + minimize = mode === 'production', + devServer = undefined, + bundleFilename = undefined, + sourceMapFilename = undefined, + assetsPath = undefined, + } = env + + if (!platform) { + throw new Error('Missing platform') + } + + process.env.BABEL_ENV = mode + + return { + mode, + devtool: false, + context, + entry, + resolve: { + ...Repack.getResolveOptions(platform), + alias: { + 'react': new URL('../../node_modules/react', import.meta.url).pathname, + '@coldsurfers/ocean-road/native': new URL('../../packages/ocean-road/src/native/index.ts', import.meta.url) + .pathname, + '@/screens': new URL('./src/screens', import.meta.url).pathname, + '@/navigations': new URL('./src/navigations', import.meta.url).pathname, + '@/lib': new URL('./src/lib', import.meta.url).pathname, + '@/ui': new URL('./src/ui', import.meta.url).pathname, + '@/features': new URL('./src/features', import.meta.url).pathname, + '@/types': new URL('./src/types', import.meta.url).pathname, + 'assets': new URL('./assets', import.meta.url).pathname, + }, + }, + output: { + clean: true, + hashFunction: 'xxhash64', + path: path.join(dirname, 'build', 'host-app', platform), + filename: 'index.bundle', + chunkFilename: '[name].chunk.bundle', + publicPath: Repack.getPublicPath({ platform, devServer }), + uniqueName: 'BilletsApp', + }, + optimization: { + minimize, + chunkIds: 'named', + }, + module: { + rules: [ + Repack.REACT_NATIVE_LOADING_RULES, + Repack.NODE_MODULES_LOADING_RULES, + Repack.FLOW_TYPED_MODULES_LOADING_RULES, + { + test: /\.[jt]sx?$/, + type: 'javascript/auto', + exclude: [/node_modules/], + use: { + loader: 'builtin:swc-loader', + options: { + env: { + targets: { 'react-native': '0.75.3' }, + }, + jsc: { + assumptions: { + setPublicClassFields: true, + privateFieldsAsProperties: true, + }, + externalHelpers: true, + transform: { + react: { + runtime: 'automatic', + }, + }, + }, + }, + }, + }, + { + test: Repack.getAssetExtensionsRegExp(Repack.ASSET_EXTENSIONS), + use: { + loader: '@callstack/repack/assets-loader', + options: { + platform, + devServerEnabled: Boolean(devServer), + }, + }, + }, + ], + }, + plugins: [ + new Repack.RepackPlugin({ + context, + mode, + platform, + devServer, + output: { + bundleFilename, + sourceMapFilename, + assetsPath, + }, + }), + // silence missing @react-native-masked-view optionally required by @react-navigation/elements + new rspack.IgnorePlugin({ + resourceRegExp: /^@react-native-masked-view/, + }), + new ReanimatedPlugin(), + ], + } +} diff --git a/apps/billets-server/package.json b/apps/billets-server/package.json index ce147dfe..2a358bd6 100644 --- a/apps/billets-server/package.json +++ b/apps/billets-server/package.json @@ -46,7 +46,7 @@ "crypto-js": "4.2.0", "date-fns": "^4.1.0", "dotenv": "^16.0.3", - "fastify": "*", + "fastify": "5.0.0", "fastify-plugin": "^5.0.1", "fastify-type-provider-zod": "^3.0.0", "google-auth-library": "^9.14.1", diff --git a/apps/wamuseum-server/package.json b/apps/wamuseum-server/package.json index 1820dccb..ef805189 100644 --- a/apps/wamuseum-server/package.json +++ b/apps/wamuseum-server/package.json @@ -34,7 +34,7 @@ "crypto-js": "4.2.0", "date-fns": "^2.29.3", "dotenv": "^16.0.3", - "fastify": "*", + "fastify": "5.0.0", "firebase-admin": "^13.0.1", "graphql": "^16.8.1", "jsonwebtoken": "^9.0.0", diff --git a/package.json b/package.json index 23b7fcd1..d65f06f6 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "@types/react-native": "0.70.8", "react-native": "0.75.3", "react-native-web": "0.19.13", - "fastify": "5.0.0", "zod": "3.23.8", "zustand": "5.0.1", "ts-pattern": "5.4.0", diff --git a/yarn.lock b/yarn.lock index e39da370..644f0ba5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3922,6 +3922,16 @@ __metadata: languageName: node linkType: hard +"@callstack/repack-plugin-reanimated@npm:5.0.0-rc.6": + version: 5.0.0-rc.6 + resolution: "@callstack/repack-plugin-reanimated@npm:5.0.0-rc.6" + peerDependencies: + "@babel/core": ^7.20 + "@callstack/repack": ^5.0.0-rc.6 + checksum: 10c0/133915fbcf62ade2d861611b9ada92f6e3e2804ffd48d11691a63ed3a99c8090c572ba27ca33deea956ca211a31c8e5d049af7dd80496fef5818e0c78b502d26 + languageName: node + linkType: hard + "@callstack/repack@npm:5.0.0-rc.10": version: 5.0.0-rc.10 resolution: "@callstack/repack@npm:5.0.0-rc.10" @@ -3983,6 +3993,7 @@ __metadata: "@babel/preset-env": "npm:^7.20.0" "@babel/runtime": "npm:^7.20.0" "@callstack/repack": "npm:5.0.0-rc.10" + "@callstack/repack-plugin-reanimated": "npm:5.0.0-rc.6" "@coldsurfers/ocean-road": "workspace:*" "@emotion/native": "npm:*" "@emotion/react": "npm:*" @@ -4019,6 +4030,7 @@ __metadata: "@uidotdev/usehooks": "npm:^2.4.1" babel-jest: "npm:^29.6.3" babel-plugin-module-resolver: "npm:^5.0.2" + babel-plugin-syntax-hermes-parser: "npm:^0.26.0" date-fns: "npm:^2.29.3" detox: "npm:^19.8.1" eslint: "npm:8.57.0" @@ -4096,7 +4108,7 @@ __metadata: dotenv: "npm:^16.0.3" dpdm: "npm:^3.14.0" eslint: "npm:8.57.0" - fastify: "npm:*" + fastify: "npm:5.0.0" fastify-plugin: "npm:^5.0.1" fastify-type-provider-zod: "npm:^3.0.0" google-auth-library: "npm:^9.14.1" @@ -4569,7 +4581,7 @@ __metadata: date-fns: "npm:^2.29.3" dotenv: "npm:^16.0.3" eslint: "npm:8.57.0" - fastify: "npm:*" + fastify: "npm:5.0.0" firebase-admin: "npm:^13.0.1" graphql: "npm:^16.8.1" jsonwebtoken: "npm:^9.0.0" @@ -5539,6 +5551,17 @@ __metadata: languageName: node linkType: hard +"@fastify/ajv-compiler@npm:^3.5.0": + version: 3.6.0 + resolution: "@fastify/ajv-compiler@npm:3.6.0" + dependencies: + ajv: "npm:^8.11.0" + ajv-formats: "npm:^2.1.1" + fast-uri: "npm:^2.0.0" + checksum: 10c0/f0be2ca1f75833492829c52c5f5ef0ec118bdd010614e002a6366952c27297c0f6a7dafb5917a0f9c4aaa84aa32a39e520c6d837fa251748717d58590cfc8177 + languageName: node + linkType: hard + "@fastify/ajv-compiler@npm:^4.0.0": version: 4.0.1 resolution: "@fastify/ajv-compiler@npm:4.0.1" @@ -5591,7 +5614,7 @@ __metadata: languageName: node linkType: hard -"@fastify/error@npm:^3.2.0": +"@fastify/error@npm:^3.2.0, @fastify/error@npm:^3.3.0, @fastify/error@npm:^3.4.0": version: 3.4.1 resolution: "@fastify/error@npm:3.4.1" checksum: 10c0/1f1a0faa8c86639afb6f4bd47a9cdc1f0f20ce0d6944340fbdec8218aaba91dc9cae9ed78e24e61bceb782a867efda2b9a6320091f00dcbb896d9c8a9bdf5f96 @@ -5605,6 +5628,15 @@ __metadata: languageName: node linkType: hard +"@fastify/fast-json-stringify-compiler@npm:^4.3.0": + version: 4.3.0 + resolution: "@fastify/fast-json-stringify-compiler@npm:4.3.0" + dependencies: + fast-json-stringify: "npm:^5.7.0" + checksum: 10c0/513ef296f5ed682f7a460cfa6c5fb917a32fc540111b873c9937f944558e021492b18f30f9fd8dd20db252381a4428adbcc9f03a077f16c86d02f081eb490c7b + languageName: node + linkType: hard + "@fastify/fast-json-stringify-compiler@npm:^5.0.0": version: 5.0.1 resolution: "@fastify/fast-json-stringify-compiler@npm:5.0.1" @@ -5627,7 +5659,7 @@ __metadata: languageName: node linkType: hard -"@fastify/merge-json-schemas@npm:^0.1.1": +"@fastify/merge-json-schemas@npm:^0.1.0, @fastify/merge-json-schemas@npm:^0.1.1": version: 0.1.1 resolution: "@fastify/merge-json-schemas@npm:0.1.1" dependencies: @@ -16292,7 +16324,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^8.0.0, ajv@npm:^8.11.0, ajv@npm:^8.12.0, ajv@npm:^8.6.3, ajv@npm:^8.9.0": +"ajv@npm:^8.0.0, ajv@npm:^8.10.0, ajv@npm:^8.11.0, ajv@npm:^8.12.0, ajv@npm:^8.6.3, ajv@npm:^8.9.0": version: 8.17.1 resolution: "ajv@npm:8.17.1" dependencies: @@ -17030,6 +17062,16 @@ __metadata: languageName: node linkType: hard +"avvio@npm:^8.3.0": + version: 8.4.0 + resolution: "avvio@npm:8.4.0" + dependencies: + "@fastify/error": "npm:^3.3.0" + fastq: "npm:^1.17.1" + checksum: 10c0/bea7f28e38b57755786852226f380ea087d572f8bbcfe14b59d1239551ef89cecc40229a6ac85e17af44c81a481d03280576586385e93d76bb9f2c5bc75c6067 + languageName: node + linkType: hard + "avvio@npm:^9.0.0": version: 9.1.0 resolution: "avvio@npm:9.1.0" @@ -17312,6 +17354,15 @@ __metadata: languageName: node linkType: hard +"babel-plugin-syntax-hermes-parser@npm:^0.26.0": + version: 0.26.0 + resolution: "babel-plugin-syntax-hermes-parser@npm:0.26.0" + dependencies: + hermes-parser: "npm:0.26.0" + checksum: 10c0/b93e74450b0e1a906d316697b49c477ddd790e9c62b8bd4de259b553eef1b33b98e0453b72a3ecec242cb3d61766c65eae7e874070e307ac91629d3b8951174a + languageName: node + linkType: hard + "babel-plugin-syntax-trailing-function-commas@npm:^7.0.0-beta.0": version: 7.0.0-beta.0 resolution: "babel-plugin-syntax-trailing-function-commas@npm:7.0.0-beta.0" @@ -19400,6 +19451,13 @@ __metadata: languageName: node linkType: hard +"cookie@npm:^0.7.0": + version: 0.7.2 + resolution: "cookie@npm:0.7.2" + checksum: 10c0/9596e8ccdbf1a3a88ae02cf5ee80c1c50959423e1022e4e60b91dd87c622af1da309253d8abdb258fb5e3eacb4f08e579dc58b4897b8087574eee0fd35dfa5d2 + languageName: node + linkType: hard + "cookie@npm:^1.0.0": version: 1.0.2 resolution: "cookie@npm:1.0.2" @@ -22662,6 +22720,13 @@ __metadata: languageName: node linkType: hard +"fast-content-type-parse@npm:^1.1.0": + version: 1.1.0 + resolution: "fast-content-type-parse@npm:1.1.0" + checksum: 10c0/882bf990fa5d64be1825ce183818db43900ece0d7ef184cb9409bae8ed1001acbe536a657b1496382cb3e308e71ab39cc399bbdae70cba1745eecaeca4e55384 + languageName: node + linkType: hard + "fast-decode-uri-component@npm:^1.0.1": version: 1.0.1 resolution: "fast-decode-uri-component@npm:1.0.1" @@ -22758,6 +22823,21 @@ __metadata: languageName: node linkType: hard +"fast-json-stringify@npm:^5.7.0, fast-json-stringify@npm:^5.8.0": + version: 5.16.1 + resolution: "fast-json-stringify@npm:5.16.1" + dependencies: + "@fastify/merge-json-schemas": "npm:^0.1.0" + ajv: "npm:^8.10.0" + ajv-formats: "npm:^3.0.1" + fast-deep-equal: "npm:^3.1.3" + fast-uri: "npm:^2.1.0" + json-schema-ref-resolver: "npm:^1.0.1" + rfdc: "npm:^1.2.0" + checksum: 10c0/bbf955d9912fb827dff0e097fdbff3c11aec540ea8019a19593a16224cac70d49d0cebd98e412843fc72259184f73a78a45e63040d3c44349f4735a492f2f1a4 + languageName: node + linkType: hard + "fast-json-stringify@npm:^6.0.0": version: 6.0.0 resolution: "fast-json-stringify@npm:6.0.0" @@ -22822,7 +22902,7 @@ __metadata: languageName: node linkType: hard -"fast-uri@npm:^2.3.0": +"fast-uri@npm:^2.0.0, fast-uri@npm:^2.1.0, fast-uri@npm:^2.3.0": version: 2.4.0 resolution: "fast-uri@npm:2.4.0" checksum: 10c0/300453cfe2f7d5ec16be0f2c8dc5b280edbaca59440b2deb4ab56ac0f584637179e9ee7539d0b70ef0fce9608245ebfa75307c84fa4829b1065c3b7ef7dcf706 @@ -22934,6 +23014,30 @@ __metadata: languageName: node linkType: hard +"fastify@npm:^4.24.3": + version: 4.29.0 + resolution: "fastify@npm:4.29.0" + dependencies: + "@fastify/ajv-compiler": "npm:^3.5.0" + "@fastify/error": "npm:^3.4.0" + "@fastify/fast-json-stringify-compiler": "npm:^4.3.0" + abstract-logging: "npm:^2.0.1" + avvio: "npm:^8.3.0" + fast-content-type-parse: "npm:^1.1.0" + fast-json-stringify: "npm:^5.8.0" + find-my-way: "npm:^8.0.0" + light-my-request: "npm:^5.11.0" + pino: "npm:^9.0.0" + process-warning: "npm:^3.0.0" + proxy-addr: "npm:^2.0.7" + rfdc: "npm:^1.3.0" + secure-json-parse: "npm:^2.7.0" + semver: "npm:^7.5.4" + toad-cache: "npm:^3.3.0" + checksum: 10c0/8bfdac5c4be943c57dfcc8d16b400f11a9bc8d4f096b4b28b06c9bb85ffedae1e5ec7a00eaa736813ebe075aa79f72a4b10d9744013229dd7cd3922c605e8e1f + languageName: node + linkType: hard + "fastparallel@npm:^2.2.0": version: 2.4.1 resolution: "fastparallel@npm:2.4.1" @@ -23224,6 +23328,17 @@ __metadata: languageName: node linkType: hard +"find-my-way@npm:^8.0.0": + version: 8.2.2 + resolution: "find-my-way@npm:8.2.2" + dependencies: + fast-deep-equal: "npm:^3.1.3" + fast-querystring: "npm:^1.0.0" + safe-regex2: "npm:^3.1.0" + checksum: 10c0/ce462b2033e08a82fa79b837e4ef9e637d5f3e6763564631ad835b4e50b22e2123c0bf27c4fe6b02bc4006cd7949c0351d2b6b6f32248e839b10bdcbd3a3269f + languageName: node + linkType: hard + "find-my-way@npm:^9.0.0": version: 9.1.0 resolution: "find-my-way@npm:9.1.0" @@ -24886,6 +25001,13 @@ __metadata: languageName: node linkType: hard +"hermes-estree@npm:0.26.0": + version: 0.26.0 + resolution: "hermes-estree@npm:0.26.0" + checksum: 10c0/4bf734b0ae484f654724f114939d349b39afe81af0f255b2e15d0fecfe2fd122f36f0b65893e936336e1a4cc77e4124ca962d054a17519f33036e20706a5386d + languageName: node + linkType: hard + "hermes-parser@npm:0.22.0": version: 0.22.0 resolution: "hermes-parser@npm:0.22.0" @@ -24913,6 +25035,15 @@ __metadata: languageName: node linkType: hard +"hermes-parser@npm:0.26.0": + version: 0.26.0 + resolution: "hermes-parser@npm:0.26.0" + dependencies: + hermes-estree: "npm:0.26.0" + checksum: 10c0/8c6340a52a10ac59ff7ab6c48a9cf09a3752d1707f8dc8962f8309da5edddf6e1dd1f403f01c85103908c74232368a8db9e076615adec925f781a0e918ec85f4 + languageName: node + linkType: hard + "hexoid@npm:^1.0.0": version: 1.0.0 resolution: "hexoid@npm:1.0.0" @@ -27913,6 +28044,17 @@ __metadata: languageName: node linkType: hard +"light-my-request@npm:^5.11.0": + version: 5.14.0 + resolution: "light-my-request@npm:5.14.0" + dependencies: + cookie: "npm:^0.7.0" + process-warning: "npm:^3.0.0" + set-cookie-parser: "npm:^2.4.1" + checksum: 10c0/5ec3af15010156d2821469d17910e0a3071c3269a8d5ffc3180fd761ffc91649ec1f9b2aaf7b5b6d44825e1038e6c07fdba247b93370186f3af9dbb94e11c0b5 + languageName: node + linkType: hard + "light-my-request@npm:^6.0.0": version: 6.3.0 resolution: "light-my-request@npm:6.3.0" @@ -32525,6 +32667,13 @@ __metadata: languageName: node linkType: hard +"process-warning@npm:^3.0.0": + version: 3.0.0 + resolution: "process-warning@npm:3.0.0" + checksum: 10c0/60f3c8ddee586f0706c1e6cb5aa9c86df05774b9330d792d7c8851cf0031afd759d665404d07037e0b4901b55c44a423f07bdc465c63de07d8d23196bb403622 + languageName: node + linkType: hard + "process-warning@npm:^4.0.0": version: 4.0.0 resolution: "process-warning@npm:4.0.0" @@ -34612,6 +34761,13 @@ __metadata: languageName: node linkType: hard +"ret@npm:~0.4.0": + version: 0.4.3 + resolution: "ret@npm:0.4.3" + checksum: 10c0/93e4e81cf393ebbafa1a26816e0b22ad0e2539c10e267d46ce8754c3f385b7aa839772ee1f83fdd2487b43d1081f29af41a19160e85456311f6f1778e14ba66b + languageName: node + linkType: hard + "ret@npm:~0.5.0": version: 0.5.0 resolution: "ret@npm:0.5.0" @@ -35008,6 +35164,15 @@ __metadata: languageName: node linkType: hard +"safe-regex2@npm:^3.1.0": + version: 3.1.0 + resolution: "safe-regex2@npm:3.1.0" + dependencies: + ret: "npm:~0.4.0" + checksum: 10c0/5e5e7f9f116ddfd324b1fdc65ad4470937eebc8883d34669ce8c5afbda64f1954e5e4c2e754ef6281e5f6762e0b8c4e20fb9eec4d47355526f8cc1f6a9764624 + languageName: node + linkType: hard + "safe-regex2@npm:^4.0.0": version: 4.0.0 resolution: "safe-regex2@npm:4.0.0" @@ -35447,7 +35612,7 @@ __metadata: languageName: node linkType: hard -"set-cookie-parser@npm:^2.6.0": +"set-cookie-parser@npm:^2.4.1, set-cookie-parser@npm:^2.6.0": version: 2.7.1 resolution: "set-cookie-parser@npm:2.7.1" checksum: 10c0/060c198c4c92547ac15988256f445eae523f57f2ceefeccf52d30d75dedf6bff22b9c26f756bd44e8e560d44ff4ab2130b178bd2e52ef5571bf7be3bd7632d9a @@ -37616,7 +37781,7 @@ __metadata: languageName: node linkType: hard -"toad-cache@npm:^3.7.0": +"toad-cache@npm:^3.3.0, toad-cache@npm:^3.7.0": version: 3.7.0 resolution: "toad-cache@npm:3.7.0" checksum: 10c0/7dae2782ee20b22c9798bb8b71dec7ec6a0091021d2ea9dd6e8afccab6b65b358fdba49a02209fac574499702e2c000660721516c87c2538d1b2c0ba03e8c0c3 From 9c362c7a09ea3ea3dd880ea6f14a0879dbcc25ff Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 10 Feb 2025 16:02:37 +0900 Subject: [PATCH 07/41] feat(billets-app): :art: installed profiler module --- apps/billets-app/App.tsx | 46 +++++++++++-------- .../com/fstvllife/android/MainApplication.kt | 16 +++---- .../ios/FstvlLifeApp/AppDelegate.mm | 3 +- apps/billets-app/ios/Podfile.lock | 6 +++ apps/billets-app/package.json | 1 + yarn.lock | 12 +++++ 6 files changed, 56 insertions(+), 28 deletions(-) diff --git a/apps/billets-app/App.tsx b/apps/billets-app/App.tsx index b6a68a09..3fd3888d 100644 --- a/apps/billets-app/App.tsx +++ b/apps/billets-app/App.tsx @@ -4,8 +4,9 @@ import { useColorSchemeStorage } from '@/lib/storage' import { CommonScreenLayout } from '@/ui' import { colors, ColorScheme } from '@coldsurfers/ocean-road' import { ColorSchemeProvider, Spinner, Text, useColorScheme } from '@coldsurfers/ocean-road/native' +import { PerformanceProfiler, RenderPassReport } from '@shopify/react-native-performance' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' -import React, { memo, PropsWithChildren, Suspense, useEffect, useMemo, useState } from 'react' +import React, { memo, PropsWithChildren, Suspense, useCallback, useEffect, useMemo, useState } from 'react' import { Platform, useColorScheme as rnUseColorScheme, StatusBar, View } from 'react-native' import BootSplash from 'react-native-bootsplash' import codePush, { DownloadProgress, RemotePackage } from 'react-native-code-push' @@ -139,25 +140,32 @@ const App = () => { return systemColorScheme ?? 'light' }, [storageColorSchemeValue, systemColorScheme]) + const onReportPrepared = useCallback((report: RenderPassReport) => { + console.log('render report', report) + // monorail.produce(convertReportToMonorailObject(report)); + }, []) + return ( - - - - - - - }> - - - - - - - - - - - + + + + + + + + }> + + + + + + + + + + + + ) } diff --git a/apps/billets-app/android/app/src/main/java/com/fstvllife/android/MainApplication.kt b/apps/billets-app/android/app/src/main/java/com/fstvllife/android/MainApplication.kt index 7d594325..b33c397e 100644 --- a/apps/billets-app/android/app/src/main/java/com/fstvllife/android/MainApplication.kt +++ b/apps/billets-app/android/app/src/main/java/com/fstvllife/android/MainApplication.kt @@ -10,8 +10,8 @@ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost import com.facebook.react.defaults.DefaultReactNativeHost import com.facebook.soloader.SoLoader -import org.wonday.orientation.OrientationActivityLifecycle import com.microsoft.codepush.react.CodePush +import com.shopify.reactnativeperformance.ReactNativePerformance class MainApplication : Application(), ReactApplication { @@ -40,12 +40,12 @@ class MainApplication : Application(), ReactApplication { get() = getDefaultReactHost(applicationContext, reactNativeHost) override fun onCreate() { - super.onCreate() - SoLoader.init(this, false) -// registerActivityLifecycleCallbacks(OrientationActivityLifecycle.getInstance()); - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - // If you opted-in for the New Architecture, we load the native entry point for this app. - load() - } + ReactNativePerformance.onAppStarted() + super.onCreate() + SoLoader.init(this, false) + if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { + // If you opted-in for the New Architecture, we load the native entry point for this app. + load() + } } } diff --git a/apps/billets-app/ios/FstvlLifeApp/AppDelegate.mm b/apps/billets-app/ios/FstvlLifeApp/AppDelegate.mm index 9609f45d..14d09ee5 100644 --- a/apps/billets-app/ios/FstvlLifeApp/AppDelegate.mm +++ b/apps/billets-app/ios/FstvlLifeApp/AppDelegate.mm @@ -7,12 +7,13 @@ #import #import "RNBootSplash.h" -//#import "Orientation.h" +#import @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [ReactNativePerformance onAppStarted]; [FIRApp configure]; self.moduleName = @"FstvlLifeApp"; // You can add your custom initial props in the dictionary below. diff --git a/apps/billets-app/ios/Podfile.lock b/apps/billets-app/ios/Podfile.lock index 0c1c3ba0..a50360f6 100644 --- a/apps/billets-app/ios/Podfile.lock +++ b/apps/billets-app/ios/Podfile.lock @@ -1738,6 +1738,8 @@ PODS: - React-logger (= 0.75.3) - React-perflogger (= 0.75.3) - React-utils (= 0.75.3) + - ReactNativePerformance (4.1.2): + - React-Core - RNAppleAuthentication (2.4.0): - React-Core - RNBootSplash (6.2.6): @@ -2019,6 +2021,7 @@ DEPENDENCIES: - React-utils (from `../../../node_modules/react-native/ReactCommon/react/utils`) - ReactCodegen (from `build/generated/ios`) - ReactCommon/turbomodule/core (from `../../../node_modules/react-native/ReactCommon`) + - "ReactNativePerformance (from `../../../node_modules/@shopify/react-native-performance`)" - "RNAppleAuthentication (from `../../../node_modules/@invertase/react-native-apple-authentication`)" - RNBootSplash (from `../../../node_modules/react-native-bootsplash`) - "RNCClipboard (from `../../../node_modules/@react-native-clipboard/clipboard`)" @@ -2214,6 +2217,8 @@ EXTERNAL SOURCES: :path: build/generated/ios ReactCommon: :path: "../../../node_modules/react-native/ReactCommon" + ReactNativePerformance: + :path: "../../../node_modules/@shopify/react-native-performance" RNAppleAuthentication: :path: "../../../node_modules/@invertase/react-native-apple-authentication" RNBootSplash: @@ -2352,6 +2357,7 @@ SPEC CHECKSUMS: React-utils: 211020f1a54caa72455ccf55853b064e590f564b ReactCodegen: c553d76baaa1d2ded9f5145a3e5cdd4b3467798b ReactCommon: d5e70af52fb05bd546fd7f002c549f57116c59e4 + ReactNativePerformance: ab7dee4c4862623d72c1530a9fc71b55458edf71 RNAppleAuthentication: e00c76acb03351f5544373c78fa7f359bef6d5d3 RNBootSplash: 107e51392c11c000af0fdcbd90336203068e5e5e RNCClipboard: 69ab8e51324d5b351f6ba72bbdb72478087a2c64 diff --git a/apps/billets-app/package.json b/apps/billets-app/package.json index ccc9bb50..7ca67d50 100644 --- a/apps/billets-app/package.json +++ b/apps/billets-app/package.json @@ -50,6 +50,7 @@ "@react-navigation/bottom-tabs": "^6.5.11", "@react-navigation/native": "^6.1.9", "@react-navigation/native-stack": "^6.9.17", + "@shopify/react-native-performance": "^4.1.2", "@tanstack/react-query": "*", "@uidotdev/usehooks": "^2.4.1", "date-fns": "^2.29.3", diff --git a/yarn.lock b/yarn.lock index 9573a297..511e95c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3940,6 +3940,7 @@ __metadata: "@react-navigation/bottom-tabs": "npm:^6.5.11" "@react-navigation/native": "npm:^6.1.9" "@react-navigation/native-stack": "npm:^6.9.17" + "@shopify/react-native-performance": "npm:^4.1.2" "@tanstack/eslint-plugin-query": "npm:^5.58.1" "@tanstack/react-query": "npm:*" "@types/lodash.uniqby": "npm:^4" @@ -10519,6 +10520,17 @@ __metadata: languageName: node linkType: hard +"@shopify/react-native-performance@npm:^4.1.2": + version: 4.1.2 + resolution: "@shopify/react-native-performance@npm:4.1.2" + peerDependencies: + "@babel/runtime": "*" + react: "*" + react-native: "*" + checksum: 10c0/b11fad3e735e13621bd94faf38fdef5ef8540df1e21f95dad834b70334f61549c667271dc654d846591f72f3bf57996e82b1875625c9576cac71c3acf32b4e3c + languageName: node + linkType: hard + "@sideway/address@npm:^4.1.5": version: 4.1.5 resolution: "@sideway/address@npm:4.1.5" From 3b2be83dbf67c75324200c7e7e7d8dcebb6184f6 Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 10 Feb 2025 16:02:48 +0900 Subject: [PATCH 08/41] feat(billets-app): :art: patch package performance module swift --- patches/@shopify+react-native-performance+4.1.2.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 patches/@shopify+react-native-performance+4.1.2.patch diff --git a/patches/@shopify+react-native-performance+4.1.2.patch b/patches/@shopify+react-native-performance+4.1.2.patch new file mode 100644 index 00000000..9d997b11 --- /dev/null +++ b/patches/@shopify+react-native-performance+4.1.2.patch @@ -0,0 +1,11 @@ +diff --git a/node_modules/@shopify/react-native-performance/ios/ReactNativePerformance/ReactNativePerformance.m b/node_modules/@shopify/react-native-performance/ios/ReactNativePerformance/ReactNativePerformance.m +index 4852113..dbb4bb5 100644 +--- a/node_modules/@shopify/react-native-performance/ios/ReactNativePerformance/ReactNativePerformance.m ++++ b/node_modules/@shopify/react-native-performance/ios/ReactNativePerformance/ReactNativePerformance.m +@@ -1,5 +1,5 @@ + #import "ReactNativePerformance.h" +-#import "ReactNativePerformance-Swift.h" ++#import + + static NSTimeInterval startupTimestamp = -1.0; + From 37f3f75064de94719ad4d026e814e0c82ad2a2ea Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 10 Feb 2025 16:08:22 +0900 Subject: [PATCH 09/41] feat(billets-app): :art: added home-screen PerformanceMeasureView --- .../src/screens/home-screen/home-screen.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/billets-app/src/screens/home-screen/home-screen.tsx b/apps/billets-app/src/screens/home-screen/home-screen.tsx index b38e6ad2..e1bc9ae8 100644 --- a/apps/billets-app/src/screens/home-screen/home-screen.tsx +++ b/apps/billets-app/src/screens/home-screen/home-screen.tsx @@ -1,5 +1,5 @@ import { CurrentLocationTracker, useToggleSubscribeConcert, useUserCurrentLocationStore } from '@/features' -import { useShowBottomTabBar } from '@/lib' +import { useShowBottomTabBar, zodScreen } from '@/lib' import { apiClient } from '@/lib/api/openapi-client' import { AnimatePresence, @@ -11,6 +11,7 @@ import { } from '@/ui' import { ConcertListItemType } from '@/ui/concert-list/concert-list.types' import { useScrollToTop } from '@react-navigation/native' +import { PerformanceMeasureView } from '@shopify/react-native-performance' import { useQuery } from '@tanstack/react-query' import { Suspense, useCallback, useRef, useState } from 'react' import { FlatList } from 'react-native' @@ -114,8 +115,10 @@ const SuspenseHomeScreen = () => { export const HomeScreen = () => { return ( - }> - - + + }> + + + ) } From 66748849377ca477c07a3e439a6d403180b62bc0 Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 10 Feb 2025 16:08:35 +0900 Subject: [PATCH 10/41] feat(billets-app): :art: added LogLevel --- apps/billets-app/App.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/billets-app/App.tsx b/apps/billets-app/App.tsx index 3fd3888d..e4026bdc 100644 --- a/apps/billets-app/App.tsx +++ b/apps/billets-app/App.tsx @@ -4,7 +4,7 @@ import { useColorSchemeStorage } from '@/lib/storage' import { CommonScreenLayout } from '@/ui' import { colors, ColorScheme } from '@coldsurfers/ocean-road' import { ColorSchemeProvider, Spinner, Text, useColorScheme } from '@coldsurfers/ocean-road/native' -import { PerformanceProfiler, RenderPassReport } from '@shopify/react-native-performance' +import { LogLevel, PerformanceProfiler, RenderPassReport } from '@shopify/react-native-performance' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import React, { memo, PropsWithChildren, Suspense, useCallback, useEffect, useMemo, useState } from 'react' import { Platform, useColorScheme as rnUseColorScheme, StatusBar, View } from 'react-native' @@ -145,8 +145,12 @@ const App = () => { // monorail.produce(convertReportToMonorailObject(report)); }, []) + const errorHandler = useCallback((error: Error) => { + console.error(error) + }, []) + return ( - + From 141fc3c2d85a88980b5daa044a56b15b5c70b993 Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 10 Feb 2025 16:12:05 +0900 Subject: [PATCH 11/41] feat(billets-app): :art: added navigation timer --- .../event-detail-screen.tsx | 23 +++++++++++-------- .../src/screens/home-screen/home-screen.tsx | 9 ++++++-- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/apps/billets-app/src/screens/event-detail-screen/event-detail-screen.tsx b/apps/billets-app/src/screens/event-detail-screen/event-detail-screen.tsx index 5d4ce136..2306a915 100644 --- a/apps/billets-app/src/screens/event-detail-screen/event-detail-screen.tsx +++ b/apps/billets-app/src/screens/event-detail-screen/event-detail-screen.tsx @@ -4,7 +4,7 @@ import { ConcertDetailVenueMapBottomSheet, } from '@/features/concert-detail' import { useToggleSubscribeConcert } from '@/features/subscribe' -import { useEffectOnce, useStoreReview } from '@/lib' +import { useEffectOnce, useStoreReview, zodScreen } from '@/lib' import { apiClient } from '@/lib/api/openapi-client' import commonStyles from '@/lib/common-styles' import { concertDetailCountForStoreReviewStorage } from '@/lib/storage' @@ -13,6 +13,7 @@ import { TicketListBottomSheet } from '@/ui/ticket-list-bottom-sheet/ticket-list import { colors } from '@coldsurfers/ocean-road' import { Spinner, useColorScheme } from '@coldsurfers/ocean-road/native' import { BottomSheetModal } from '@gorhom/bottom-sheet' +import { PerformanceMeasureView } from '@shopify/react-native-performance' import { useQuery, useSuspenseQuery } from '@tanstack/react-query' import React, { PropsWithChildren, Suspense, useCallback, useMemo, useRef } from 'react' import { Dimensions, Platform, StatusBar, StyleSheet, View } from 'react-native' @@ -228,15 +229,17 @@ const ScreenInner = () => { export const EventDetailScreen = () => { return ( - - - - } - > - - + + + + + } + > + + + ) } diff --git a/apps/billets-app/src/screens/home-screen/home-screen.tsx b/apps/billets-app/src/screens/home-screen/home-screen.tsx index e1bc9ae8..460ea830 100644 --- a/apps/billets-app/src/screens/home-screen/home-screen.tsx +++ b/apps/billets-app/src/screens/home-screen/home-screen.tsx @@ -11,7 +11,7 @@ import { } from '@/ui' import { ConcertListItemType } from '@/ui/concert-list/concert-list.types' import { useScrollToTop } from '@react-navigation/native' -import { PerformanceMeasureView } from '@shopify/react-native-performance' +import { PerformanceMeasureView, useStartProfiler } from '@shopify/react-native-performance' import { useQuery } from '@tanstack/react-query' import { Suspense, useCallback, useRef, useState } from 'react' import { FlatList } from 'react-native' @@ -19,6 +19,7 @@ import { useShallow } from 'zustand/shallow' import { useHomeScreenNavigation } from './home-screen.hooks' const SuspenseHomeScreen = () => { + const startNavigationTTITimer = useStartProfiler() const navigation = useHomeScreenNavigation() const listRef = useRef(null) useScrollToTop(listRef) @@ -48,12 +49,16 @@ const SuspenseHomeScreen = () => { const onPressConcertListItem = useCallback( (item: ConcertListItemType) => { + startNavigationTTITimer({ + source: zodScreen.HomeScreen.name, + uiEvent: undefined, + }) navigation.navigate('EventStackNavigation', { screen: 'EventDetailScreen', params: { eventId: item.id }, }) }, - [navigation], + [navigation, startNavigationTTITimer], ) const onPressSubscribeConcertListItem = useCallback( From 6f0c1254f4a43748833a925897f2ebc11f57499d Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 10 Feb 2025 16:17:09 +0900 Subject: [PATCH 12/41] feat(billets-app): :art: added enabled prop --- apps/billets-app/App.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/billets-app/App.tsx b/apps/billets-app/App.tsx index e4026bdc..e4ee4de8 100644 --- a/apps/billets-app/App.tsx +++ b/apps/billets-app/App.tsx @@ -150,7 +150,12 @@ const App = () => { }, []) return ( - + From c708bec8472cc43a55f4d0f541223aaad87f7441 Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 10 Feb 2025 16:17:23 +0900 Subject: [PATCH 13/41] feat(billets-app): :art: added few options to home screen profiler --- .../src/screens/home-screen/home-screen.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/billets-app/src/screens/home-screen/home-screen.tsx b/apps/billets-app/src/screens/home-screen/home-screen.tsx index 460ea830..c1ae3d07 100644 --- a/apps/billets-app/src/screens/home-screen/home-screen.tsx +++ b/apps/billets-app/src/screens/home-screen/home-screen.tsx @@ -11,10 +11,10 @@ import { } from '@/ui' import { ConcertListItemType } from '@/ui/concert-list/concert-list.types' import { useScrollToTop } from '@react-navigation/native' -import { PerformanceMeasureView, useStartProfiler } from '@shopify/react-native-performance' +import { PerformanceMeasureView, RenderStateProps, useStartProfiler } from '@shopify/react-native-performance' import { useQuery } from '@tanstack/react-query' import { Suspense, useCallback, useRef, useState } from 'react' -import { FlatList } from 'react-native' +import { FlatList, View } from 'react-native' import { useShallow } from 'zustand/shallow' import { useHomeScreenNavigation } from './home-screen.hooks' @@ -119,8 +119,18 @@ const SuspenseHomeScreen = () => { } export const HomeScreen = () => { + const renderStateProps: RenderStateProps = { + interactive: false, + renderPassName: 'home_screen_render', + } return ( - + } + > }> From 47e4e39293b94c8850346403f343fc8ad0ce4e0a Mon Sep 17 00:00:00 2001 From: yungblud Date: Sun, 16 Feb 2025 16:01:25 +0900 Subject: [PATCH 14/41] feat: init branch From 2200be5b37f8c69638a86b6359db05b5f489a788 Mon Sep 17 00:00:00 2001 From: yungblud Date: Sun, 16 Feb 2025 16:15:52 +0900 Subject: [PATCH 15/41] feat(billets-app): :art: implemented get subscribe info me api --- .../billets-app/src/lib/api/openapi-client.ts | 8 ++ apps/billets-app/src/types/api.d.ts | 114 ++++++++++++++++++ 2 files changed, 122 insertions(+) diff --git a/apps/billets-app/src/lib/api/openapi-client.ts b/apps/billets-app/src/lib/api/openapi-client.ts index 3e312834..86d94b78 100644 --- a/apps/billets-app/src/lib/api/openapi-client.ts +++ b/apps/billets-app/src/lib/api/openapi-client.ts @@ -186,6 +186,7 @@ export const apiClient = { eventSubscribe: ({ eventId }: { eventId: string }) => ['v1', 'subscribe', 'event', { eventId }], artistSubscribe: ({ artistId }: { artistId: string }) => ['v1', 'subscribe', 'artist', { artistId }], venueSubscribe: ({ venueId }: { venueId: string }) => ['v1', 'subscribe', 'venue', { venueId }], + infoMe: ['v1', 'subscribe', 'me'], }, getEventList: async (params: { offset: number; size: number }) => { const data = await fetchClient.GET('/v1/subscribe/event', { @@ -303,6 +304,13 @@ export const apiClient = { } return data.data }, + getInfoMe: async () => { + const data = await fetchClient.GET('/v1/subscribe/me') + if (data.error) { + throw new OpenApiError(data.error) + } + return data.data + }, }, ticket: { queryKeys: { diff --git a/apps/billets-app/src/types/api.d.ts b/apps/billets-app/src/types/api.d.ts index 35f77ff9..c887a52a 100644 --- a/apps/billets-app/src/types/api.d.ts +++ b/apps/billets-app/src/types/api.d.ts @@ -431,6 +431,50 @@ export interface paths { patch?: never trace?: never } + '/v1/event-category/': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['EventCategoryDTOSchema'][] + } + } + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseDTOSchema'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } '/v1/event/': { parameters: { query?: never @@ -441,8 +485,10 @@ export interface paths { get: { parameters: { query?: { + eventCategoryName?: string latitude?: number locationCityId?: string + locationCityName?: string longitude?: number offset?: number size?: number @@ -1471,6 +1517,59 @@ export interface paths { patch?: never trace?: never } + '/v1/subscribe/me': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['SubscribeInfoMeDTOSchema'] + } + } + /** @description Default Response */ + 401: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseDTOSchema'] + } + } + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseDTOSchema'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } '/v1/subscribe/venue': { parameters: { query?: never @@ -2064,6 +2163,10 @@ export interface components { | 'IMAGE_NOT_FOUND' message: string } + EventCategoryDTOSchema: { + id: string + name: string + } EventDetailDTOSchema: { data: { artists: components['schemas']['ArtistDTOSchema'][] @@ -2150,6 +2253,17 @@ export interface components { SendEmailResponseDTOSchema: { success: boolean } + SubscribeInfoMeDTOSchema: { + artists: { + count: number + } + events: { + count: number + } + venues: { + count: number + } + } TicketDTOSchema: { id: string /** Format: date-time */ From 6466223c64b54756549c0210bc62ee16814f0722 Mon Sep 17 00:00:00 2001 From: yungblud Date: Sun, 16 Feb 2025 16:16:03 +0900 Subject: [PATCH 16/41] feat(ocean-road): :art: modified native Button --- packages/ocean-road/src/native/button/button.styled.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ocean-road/src/native/button/button.styled.ts b/packages/ocean-road/src/native/button/button.styled.ts index e7e55aab..901b8531 100644 --- a/packages/ocean-road/src/native/button/button.styled.ts +++ b/packages/ocean-road/src/native/button/button.styled.ts @@ -5,7 +5,7 @@ import { getButtonBackgroundColor, getButtonForegroundColor } from '../../button import { colors } from '../../tokens' import { Text } from '../text' -export const StyledButton = styled.Pressable<{ +export const StyledButton = styled.TouchableOpacity<{ colorTheme: ButtonTheme size: 'lg' | 'md' | 'sm' }>` From 5c1c225de1d89ec436ff17f2e1c7e09c43c3d825 Mon Sep 17 00:00:00 2001 From: yungblud Date: Sun, 16 Feb 2025 16:16:14 +0900 Subject: [PATCH 17/41] feat(billets-app): :art: modified MyScreen --- .../src/screens/my-screen/my-screen.tsx | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/apps/billets-app/src/screens/my-screen/my-screen.tsx b/apps/billets-app/src/screens/my-screen/my-screen.tsx index afa88c13..d268e6ca 100644 --- a/apps/billets-app/src/screens/my-screen/my-screen.tsx +++ b/apps/billets-app/src/screens/my-screen/my-screen.tsx @@ -1,9 +1,10 @@ import { useShowBottomTabBar } from '@/lib' import { apiClient } from '@/lib/api/openapi-client' -import { CommonScreenLayout, MyScreenLandingLayout, SubscribedConcertList, SubscribedConcertListSkeleton } from '@/ui' +import { CommonScreenLayout, MyScreenLandingLayout, SubscribedConcertListSkeleton } from '@/ui' import { colors } from '@coldsurfers/ocean-road' import { Button, ProfileThumbnail, Spinner, Text, useColorScheme } from '@coldsurfers/ocean-road/native' import { useQuery } from '@tanstack/react-query' +import { CircleUserRound, Star } from 'lucide-react-native' import React, { Suspense, useCallback, useMemo } from 'react' import { Pressable, SectionList, SectionListRenderItem, StyleSheet, View } from 'react-native' import { match } from 'ts-pattern' @@ -20,6 +21,10 @@ const SuspenseMyScreen = () => { queryKey: apiClient.user.queryKeys.me, queryFn: () => apiClient.user.getMe(), }) + const { data: subscribeInfoMe } = useQuery({ + queryKey: apiClient.subscribe.queryKeys.infoMe, + queryFn: () => apiClient.subscribe.getInfoMe(), + }) const { semantics } = useColorScheme() useShowBottomTabBar() @@ -44,6 +49,16 @@ const SuspenseMyScreen = () => { (info: { section: MyScreenSettingSectionListSectionT }) => { return ( + + {match(info.section.title) + .with('profile', () => { + return + }) + .with('saved', () => { + return + }) + .otherwise(() => null)} + {info.section.uiTitle} {info.section.moreAddOn && ( @@ -89,13 +104,13 @@ const SuspenseMyScreen = () => { .with('saved', () => { return ( }> - + {/* */} ) }) .exhaustive() }, - [onPressSubscribedConcertListItem, semantics.foreground], + [semantics.foreground], ) const sections = useMemo(() => { @@ -105,25 +120,25 @@ const SuspenseMyScreen = () => { return [ { title: 'profile', - uiTitle: '🙂 마이 프로필', + uiTitle: '마이 프로필', data: [{ title: user.email.split('@')[0], onPress: () => {} }], }, { title: 'saved', - uiTitle: '❣️ 찜한 공연', - moreAddOn: { - uiText: '더 보기', - onPress: () => { - navigation.navigate('SubscribedStackNavigation', { - screen: 'SubscribedConcertListScreen', - params: {}, - }) - }, - }, + uiTitle: 'Following', + // moreAddOn: { + // uiText: '더 보기', + // onPress: () => { + // navigation.navigate('SubscribedStackNavigation', { + // screen: 'SubscribedConcertListScreen', + // params: {}, + // }) + // }, + // }, data: [{ title: user.email.split('@')[0], onPress: () => {} }], }, ] - }, [navigation, user]) + }, [user]) return user ? ( From 4315d56d9d2e1a809b9fe482355b27a596012a12 Mon Sep 17 00:00:00 2001 From: yungblud Date: Sun, 16 Feb 2025 16:51:46 +0900 Subject: [PATCH 18/41] feat(billets-app): :art: modified api --- apps/billets-app/src/types/api.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/billets-app/src/types/api.d.ts b/apps/billets-app/src/types/api.d.ts index c887a52a..2b58a004 100644 --- a/apps/billets-app/src/types/api.d.ts +++ b/apps/billets-app/src/types/api.d.ts @@ -2095,6 +2095,7 @@ export interface components { artistId: string /** Format: date-time */ subscribedAt: string + thumbUrl?: string /** Format: uuid */ userId: string } @@ -2194,6 +2195,7 @@ export interface components { eventId: string /** Format: date-time */ subscribedAt: string + thumbUrl?: string /** Format: uuid */ userId: string } @@ -2256,12 +2258,15 @@ export interface components { SubscribeInfoMeDTOSchema: { artists: { count: number + thumbUrl: string | null } events: { count: number + thumbUrl: string | null } venues: { count: number + thumbUrl: string | null } } TicketDTOSchema: { @@ -2312,6 +2317,7 @@ export interface components { VenueSubscribeDTOSchema: { /** Format: date-time */ subscribedAt: string + thumbUrl?: string /** Format: uuid */ userId: string /** Format: uuid */ From 1fdfd814c31d82b27443e16af77c9670cb5aaeb2 Mon Sep 17 00:00:00 2001 From: yungblud Date: Sun, 16 Feb 2025 16:52:03 +0900 Subject: [PATCH 19/41] feat(billets-app): :art: implemented subscribe-info-me --- .../src/screens/my-screen/my-screen.tsx | 27 ++-------- apps/billets-app/src/ui/index.ts | 1 + .../src/ui/subscribe-info-me/index.ts | 1 + .../subscribe-info-me.item.tsx | 52 +++++++++++++++++++ .../subscribe-info-me.styled.ts | 23 ++++++++ .../subscribe-info-me/subscribe-info-me.tsx | 47 +++++++++++++++++ .../subscribe-info-me.types.ts | 3 ++ 7 files changed, 130 insertions(+), 24 deletions(-) create mode 100644 apps/billets-app/src/ui/subscribe-info-me/index.ts create mode 100644 apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx create mode 100644 apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.styled.ts create mode 100644 apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.tsx create mode 100644 apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.types.ts diff --git a/apps/billets-app/src/screens/my-screen/my-screen.tsx b/apps/billets-app/src/screens/my-screen/my-screen.tsx index d268e6ca..aa0e1fc0 100644 --- a/apps/billets-app/src/screens/my-screen/my-screen.tsx +++ b/apps/billets-app/src/screens/my-screen/my-screen.tsx @@ -1,6 +1,6 @@ import { useShowBottomTabBar } from '@/lib' import { apiClient } from '@/lib/api/openapi-client' -import { CommonScreenLayout, MyScreenLandingLayout, SubscribedConcertListSkeleton } from '@/ui' +import { CommonScreenLayout, MyScreenLandingLayout, SubscribedConcertListSkeleton, SubscribeInfoMe } from '@/ui' import { colors } from '@coldsurfers/ocean-road' import { Button, ProfileThumbnail, Spinner, Text, useColorScheme } from '@coldsurfers/ocean-road/native' import { useQuery } from '@tanstack/react-query' @@ -21,10 +21,7 @@ const SuspenseMyScreen = () => { queryKey: apiClient.user.queryKeys.me, queryFn: () => apiClient.user.getMe(), }) - const { data: subscribeInfoMe } = useQuery({ - queryKey: apiClient.subscribe.queryKeys.infoMe, - queryFn: () => apiClient.subscribe.getInfoMe(), - }) + const { semantics } = useColorScheme() useShowBottomTabBar() @@ -35,15 +32,6 @@ const SuspenseMyScreen = () => { params: {}, }) }, [navigation]) - const onPressSubscribedConcertListItem = useCallback( - (eventId: string) => { - navigation.navigate('EventStackNavigation', { - screen: 'EventDetailScreen', - params: { eventId }, - }) - }, - [navigation], - ) const renderSectionHeader = useCallback( (info: { section: MyScreenSettingSectionListSectionT }) => { @@ -104,7 +92,7 @@ const SuspenseMyScreen = () => { .with('saved', () => { return ( }> - {/* */} + ) }) @@ -126,15 +114,6 @@ const SuspenseMyScreen = () => { { title: 'saved', uiTitle: 'Following', - // moreAddOn: { - // uiText: '더 보기', - // onPress: () => { - // navigation.navigate('SubscribedStackNavigation', { - // screen: 'SubscribedConcertListScreen', - // params: {}, - // }) - // }, - // }, data: [{ title: user.email.split('@')[0], onPress: () => {} }], }, ] diff --git a/apps/billets-app/src/ui/index.ts b/apps/billets-app/src/ui/index.ts index a8696080..348d3707 100644 --- a/apps/billets-app/src/ui/index.ts +++ b/apps/billets-app/src/ui/index.ts @@ -26,6 +26,7 @@ export * from './search-location-concert-list' export * from './search-screen-navigation-header' export * from './search.ui.constants' export * from './settings-menu-list' +export * from './subscribe-info-me' export * from './subscribed-concert-list' export * from './subscribed-concert-list-item' export * from './tab-bar' diff --git a/apps/billets-app/src/ui/subscribe-info-me/index.ts b/apps/billets-app/src/ui/subscribe-info-me/index.ts new file mode 100644 index 00000000..d475b488 --- /dev/null +++ b/apps/billets-app/src/ui/subscribe-info-me/index.ts @@ -0,0 +1 @@ +export * from './subscribe-info-me' diff --git a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx new file mode 100644 index 00000000..7c2b8a83 --- /dev/null +++ b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx @@ -0,0 +1,52 @@ +import { Text, useColorScheme } from '@coldsurfers/ocean-road/native' +import { useMemo } from 'react' +import { match } from 'ts-pattern' +import { z } from 'zod' +import { + StyledSubscribeInfoMeContainer, + StyledSubscribeInfoMeItem, + StyledSubscribeInfoMeItemImage, +} from './subscribe-info-me.styled' +import { InfoMeItemTypeSchema } from './subscribe-info-me.types' + +const refineCount = (count: number) => { + if (count > 99) { + return `99+` + } + return count +} + +export const SubscribeInfoMeItem = ({ + type, + count, + thumbUrl, +}: { + type: z.infer + count: number + thumbUrl?: string +}) => { + const { semantics } = useColorScheme() + const refinedCount = useMemo(() => refineCount(count), [count]) + // navigation.navigate('SubscribedStackNavigation', { + // screen: 'SubscribedConcertListScreen', + // params: {}, + // }) + return ( + + + + + + {match(type) + .with('artists', () => `${refinedCount} 아티스트`) + .with('events', () => `${refinedCount} 공연`) + .with('venues', () => `${refinedCount} 공연장`) + .exhaustive()} + + + ) +} diff --git a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.styled.ts b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.styled.ts new file mode 100644 index 00000000..046e3d46 --- /dev/null +++ b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.styled.ts @@ -0,0 +1,23 @@ +import styled from '@emotion/native' +import FastImage from 'react-native-fast-image' + +export const StyledSubscribeInfoMeContainer = styled.View` + flex-direction: column; + align-items: center; + margin-right: 8px; +` + +export const StyledSubscribeInfoMeItem = styled.View` + border-width: 1px; + width: 92px; + height: 92px; + border-radius: 46px; + align-items: center; + justify-content: center; +` + +export const StyledSubscribeInfoMeItemImage = styled(FastImage)` + width: 84px; + height: 84px; + border-radius: 42px; +` diff --git a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.tsx b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.tsx new file mode 100644 index 00000000..6e77b406 --- /dev/null +++ b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.tsx @@ -0,0 +1,47 @@ +import { apiClient } from '@/lib/api/openapi-client' +import { useSuspenseQuery } from '@tanstack/react-query' +import { useMemo } from 'react' +import { FlatList } from 'react-native' +import { SubscribeInfoMeItem } from './subscribe-info-me.item' +import { InfoMeItemTypeSchema } from './subscribe-info-me.types' + +export const SubscribeInfoMe = () => { + const { data: subscribeInfoMe } = useSuspenseQuery({ + queryKey: apiClient.subscribe.queryKeys.infoMe, + queryFn: () => apiClient.subscribe.getInfoMe(), + }) + const data = useMemo( + () => + Object.entries(subscribeInfoMe).map(([key, value]) => { + return { + type: key, + value, + } + }), + [subscribeInfoMe], + ) + console.log(data) + return ( + { + const validation = InfoMeItemTypeSchema.safeParse(item.type) + if (!validation.success) { + console.error(validation.error) + return null + } + return ( + + ) + }} + keyExtractor={(item) => `${item.type}`} + style={{ + flex: 1, + }} + contentContainerStyle={{ + paddingHorizontal: 16, + }} + /> + ) +} diff --git a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.types.ts b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.types.ts new file mode 100644 index 00000000..06ae246d --- /dev/null +++ b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.types.ts @@ -0,0 +1,3 @@ +import { z } from 'zod' + +export const InfoMeItemTypeSchema = z.union([z.literal('artists'), z.literal('events'), z.literal('venues')]) From deae0e1ef264475cf577ac60d168d8730aaeafb4 Mon Sep 17 00:00:00 2001 From: yungblud Date: Sun, 16 Feb 2025 16:54:25 +0900 Subject: [PATCH 20/41] feat(billets-app): :art: implemented press handler --- .../subscribed-stack-navigation.tsx | 2 +- .../subscribe-info-me.item.tsx | 23 ++++++++++++++----- .../subscribe-info-me.styled.ts | 2 +- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.tsx b/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.tsx index 2ab575e5..9b482b56 100644 --- a/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.tsx +++ b/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.tsx @@ -19,7 +19,7 @@ export const SubscribedStackNavigation = () => { {...props} options={{ ...props.options, - title: '찜한공연', + title: '공연', }} /> ), diff --git a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx index 7c2b8a83..15b30004 100644 --- a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx +++ b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx @@ -1,5 +1,6 @@ +import { useMyScreenNavigation } from '@/screens/my-screen' import { Text, useColorScheme } from '@coldsurfers/ocean-road/native' -import { useMemo } from 'react' +import { useCallback, useMemo } from 'react' import { match } from 'ts-pattern' import { z } from 'zod' import { @@ -27,12 +28,22 @@ export const SubscribeInfoMeItem = ({ }) => { const { semantics } = useColorScheme() const refinedCount = useMemo(() => refineCount(count), [count]) - // navigation.navigate('SubscribedStackNavigation', { - // screen: 'SubscribedConcertListScreen', - // params: {}, - // }) + const navigation = useMyScreenNavigation() + + const onPress = useCallback(() => { + match(type) + .with('artists', () => {}) + .with('events', () => { + navigation.navigate('SubscribedStackNavigation', { + screen: 'SubscribedConcertListScreen', + params: {}, + }) + }) + .with('venues', () => {}) + .exhaustive() + }, [navigation, type]) return ( - + Date: Sun, 16 Feb 2025 16:57:49 +0900 Subject: [PATCH 21/41] feat(billets-app): :art: implemented SubscribedArtistListScreen --- .../billets-app/src/lib/navigations/constants.ts | 4 ++++ .../subscribed-stack-navigation.tsx | 16 ++++++++++++++++ .../subscribed-stack-navigation.types.ts | 2 ++ .../subscribed-artist-list-screen/index.ts | 2 ++ .../subscribed-artist-list-screen.tsx | 3 +++ .../subscribed-artist-list-screen.types.ts | 7 +++++++ .../subscribe-info-me/subscribe-info-me.item.tsx | 7 ++++++- 7 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 apps/billets-app/src/screens/subscribed-artist-list-screen/index.ts create mode 100644 apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.tsx create mode 100644 apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.types.ts diff --git a/apps/billets-app/src/lib/navigations/constants.ts b/apps/billets-app/src/lib/navigations/constants.ts index 55ab166f..997f950f 100644 --- a/apps/billets-app/src/lib/navigations/constants.ts +++ b/apps/billets-app/src/lib/navigations/constants.ts @@ -103,6 +103,10 @@ export const zodScreen = createZodScreen({ name: 'SubscribedConcertListScreen', params: z.object({}), }, + SubscribedArtistListScreen: { + name: 'SubscribedArtistListScreen', + params: z.object({}), + }, VenueDetailScreen: { name: 'VenueDetailScreen', params: z.object({ diff --git a/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.tsx b/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.tsx index 9b482b56..ded09a18 100644 --- a/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.tsx +++ b/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.tsx @@ -1,4 +1,5 @@ import { SubscribedConcertListScreen } from '@/screens' +import { SubscribedArtistListScreen } from '@/screens/subscribed-artist-list-screen' import { NavigationHeader } from '@/ui' import { createNativeStackNavigator } from '@react-navigation/native-stack' import { SubscribedStackParamList } from './subscribed-stack-navigation.types' @@ -27,6 +28,21 @@ export const SubscribedStackNavigation = () => { name="SubscribedConcertListScreen" component={SubscribedConcertListScreen} /> + ( + + ), + }} + name="SubscribedArtistListScreen" + component={SubscribedArtistListScreen} + /> ) } diff --git a/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.types.ts b/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.types.ts index 3e55cd62..c7c4b051 100644 --- a/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.types.ts +++ b/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.types.ts @@ -1,5 +1,6 @@ import { ZodNavigationParamList, ZodNavigationParams } from '@/lib' import { SubscribedConcertListScreenParams } from '@/screens' +import { SubscribedArtistListScreenParams } from '@/screens/subscribed-artist-list-screen' import { CompositeScreenProps } from '@react-navigation/native' import { NativeStackScreenProps } from '@react-navigation/native-stack' import { zodNavigation, zodScreen } from '../../lib/navigations/constants' @@ -9,6 +10,7 @@ export type SubscribedStackParams = ZodNavigationParams export type SubscribedStackScreenProps = CompositeScreenProps< diff --git a/apps/billets-app/src/screens/subscribed-artist-list-screen/index.ts b/apps/billets-app/src/screens/subscribed-artist-list-screen/index.ts new file mode 100644 index 00000000..b3272a96 --- /dev/null +++ b/apps/billets-app/src/screens/subscribed-artist-list-screen/index.ts @@ -0,0 +1,2 @@ +export * from './subscribed-artist-list-screen' +export * from './subscribed-artist-list-screen.types' diff --git a/apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.tsx b/apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.tsx new file mode 100644 index 00000000..0d65daef --- /dev/null +++ b/apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.tsx @@ -0,0 +1,3 @@ +import { CommonScreenLayout } from '@/ui' + +export const SubscribedArtistListScreen = () => diff --git a/apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.types.ts b/apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.types.ts new file mode 100644 index 00000000..24500512 --- /dev/null +++ b/apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.types.ts @@ -0,0 +1,7 @@ +import { zodScreen, ZodScreenParams } from '@/lib' +import { SubscribedStackScreenProps } from '@/navigations' + +export type SubscribedArtistListScreenParams = ZodScreenParams +export type SubscribedArtistListScreenProps = SubscribedStackScreenProps< + typeof zodScreen.SubscribedArtistListScreen.name +> diff --git a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx index 15b30004..9e9d886d 100644 --- a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx +++ b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx @@ -32,7 +32,12 @@ export const SubscribeInfoMeItem = ({ const onPress = useCallback(() => { match(type) - .with('artists', () => {}) + .with('artists', () => { + navigation.navigate('SubscribedStackNavigation', { + screen: 'SubscribedArtistListScreen', + params: {}, + }) + }) .with('events', () => { navigation.navigate('SubscribedStackNavigation', { screen: 'SubscribedConcertListScreen', From 8ed93a499a276c89238c905249db0843961123a4 Mon Sep 17 00:00:00 2001 From: yungblud Date: Sun, 16 Feb 2025 17:02:10 +0900 Subject: [PATCH 22/41] feat(billets-app): :art: implemented subscribed venue list screen and modified common screen layout --- .../src/lib/navigations/constants.ts | 4 ++ .../subscribed-stack-navigation.tsx | 16 ++++++++ .../subscribed-stack-navigation.types.ts | 2 + .../subscribed-venue-list-screen/index.ts | 2 + .../subscribed-venue-list-screen.tsx | 3 ++ .../subscribed-venue-list-screen.types.ts | 5 +++ .../common-screen-layout.tsx | 38 +++++++++---------- .../subscribe-info-me.item.tsx | 7 +++- .../subscribed-concert-list.tsx | 11 +++++- 9 files changed, 66 insertions(+), 22 deletions(-) create mode 100644 apps/billets-app/src/screens/subscribed-venue-list-screen/index.ts create mode 100644 apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.tsx create mode 100644 apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.types.ts diff --git a/apps/billets-app/src/lib/navigations/constants.ts b/apps/billets-app/src/lib/navigations/constants.ts index 997f950f..34877546 100644 --- a/apps/billets-app/src/lib/navigations/constants.ts +++ b/apps/billets-app/src/lib/navigations/constants.ts @@ -107,6 +107,10 @@ export const zodScreen = createZodScreen({ name: 'SubscribedArtistListScreen', params: z.object({}), }, + SubscribedVenueListScreen: { + name: 'SubscribedVenueListScreen', + params: z.object({}), + }, VenueDetailScreen: { name: 'VenueDetailScreen', params: z.object({ diff --git a/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.tsx b/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.tsx index ded09a18..a67c419c 100644 --- a/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.tsx +++ b/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.tsx @@ -1,5 +1,6 @@ import { SubscribedConcertListScreen } from '@/screens' import { SubscribedArtistListScreen } from '@/screens/subscribed-artist-list-screen' +import { SubscribedVenueListScreen } from '@/screens/subscribed-venue-list-screen' import { NavigationHeader } from '@/ui' import { createNativeStackNavigator } from '@react-navigation/native-stack' import { SubscribedStackParamList } from './subscribed-stack-navigation.types' @@ -43,6 +44,21 @@ export const SubscribedStackNavigation = () => { name="SubscribedArtistListScreen" component={SubscribedArtistListScreen} /> + ( + + ), + }} + name="SubscribedVenueListScreen" + component={SubscribedVenueListScreen} + /> ) } diff --git a/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.types.ts b/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.types.ts index c7c4b051..d30eea85 100644 --- a/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.types.ts +++ b/apps/billets-app/src/navigations/subscribed-stack-navigation/subscribed-stack-navigation.types.ts @@ -1,6 +1,7 @@ import { ZodNavigationParamList, ZodNavigationParams } from '@/lib' import { SubscribedConcertListScreenParams } from '@/screens' import { SubscribedArtistListScreenParams } from '@/screens/subscribed-artist-list-screen' +import { SubscribedVenueListScreenParams } from '@/screens/subscribed-venue-list-screen' import { CompositeScreenProps } from '@react-navigation/native' import { NativeStackScreenProps } from '@react-navigation/native-stack' import { zodNavigation, zodScreen } from '../../lib/navigations/constants' @@ -11,6 +12,7 @@ export type SubscribedStackParams = ZodNavigationParams export type SubscribedStackScreenProps = CompositeScreenProps< diff --git a/apps/billets-app/src/screens/subscribed-venue-list-screen/index.ts b/apps/billets-app/src/screens/subscribed-venue-list-screen/index.ts new file mode 100644 index 00000000..85ae593d --- /dev/null +++ b/apps/billets-app/src/screens/subscribed-venue-list-screen/index.ts @@ -0,0 +1,2 @@ +export * from './subscribed-venue-list-screen' +export * from './subscribed-venue-list-screen.types' diff --git a/apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.tsx b/apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.tsx new file mode 100644 index 00000000..1ac42d2f --- /dev/null +++ b/apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.tsx @@ -0,0 +1,3 @@ +import { CommonScreenLayout } from '@/ui' + +export const SubscribedVenueListScreen = () => diff --git a/apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.types.ts b/apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.types.ts new file mode 100644 index 00000000..33f56268 --- /dev/null +++ b/apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.types.ts @@ -0,0 +1,5 @@ +import { zodScreen, ZodScreenParams } from '@/lib' +import { SubscribedStackScreenProps } from '@/navigations' + +export type SubscribedVenueListScreenParams = ZodScreenParams +export type SubscribedVenueListScreenProps = SubscribedStackScreenProps diff --git a/apps/billets-app/src/ui/common-screen-layout/common-screen-layout.tsx b/apps/billets-app/src/ui/common-screen-layout/common-screen-layout.tsx index 8105a9cb..cf0232e9 100644 --- a/apps/billets-app/src/ui/common-screen-layout/common-screen-layout.tsx +++ b/apps/billets-app/src/ui/common-screen-layout/common-screen-layout.tsx @@ -17,26 +17,24 @@ export const CommonScreenLayout = ({ const { bottom: bottomInset } = useSafeAreaInsets() const { tabBarHeight } = useBottomTab() return ( - }> - - {children} - - + + }>{children} + ) } diff --git a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx index 9e9d886d..720d6ef5 100644 --- a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx +++ b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx @@ -44,7 +44,12 @@ export const SubscribeInfoMeItem = ({ params: {}, }) }) - .with('venues', () => {}) + .with('venues', () => { + navigation.navigate('SubscribedStackNavigation', { + screen: 'SubscribedVenueListScreen', + params: {}, + }) + }) .exhaustive() }, [navigation, type]) return ( diff --git a/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx b/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx index 721569e8..6a6eaef7 100644 --- a/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx +++ b/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx @@ -1,4 +1,5 @@ import { apiClient } from '@/lib/api/openapi-client' +import { useColorScheme } from '@coldsurfers/ocean-road/native' import { useSuspenseInfiniteQuery } from '@tanstack/react-query' import { Suspense, useCallback, useMemo, useState } from 'react' import { FlatList, ListRenderItem, View } from 'react-native' @@ -19,6 +20,7 @@ export function SubscribedConcertList({ horizontal?: boolean listHeaderComponent?: React.ComponentType }) { + const { semantics } = useColorScheme() const [isRefreshing, setIsRefreshing] = useState(false) const { data: concertListData, @@ -97,7 +99,11 @@ export function SubscribedConcertList({ keyExtractor={(item) => `${item.eventId}`} renderItem={renderItem} ItemSeparatorComponent={ItemSeparator} - contentContainerStyle={subscribedConcertListStyles.contentContainer} + contentContainerStyle={{ + paddingHorizontal: 16, + marginTop: 12, + backgroundColor: semantics.background[3], + }} ListHeaderComponent={listHeaderComponent} onEndReached={horizontal ? undefined : onEndReached} onRefresh={horizontal ? undefined : onRefresh} @@ -105,6 +111,9 @@ export function SubscribedConcertList({ showsHorizontalScrollIndicator={false} showsVerticalScrollIndicator={false} bounces={!horizontal} + style={{ + backgroundColor: semantics.background[3], + }} /> ) } From 3fb89332c6c5513fcebe1f2e5afd37528eff4506 Mon Sep 17 00:00:00 2001 From: yungblud Date: Sun, 16 Feb 2025 17:06:30 +0900 Subject: [PATCH 23/41] feat(billets-app): :art: implemented withBottomTab common screen layout --- .../subscribed-concert-list-screen.tsx | 2 +- .../src/ui/common-screen-layout/common-screen-layout.tsx | 4 +++- .../ui/subscribed-concert-list/subscribed-concert-list.tsx | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/billets-app/src/screens/subscribed-concert-list-screen/subscribed-concert-list-screen.tsx b/apps/billets-app/src/screens/subscribed-concert-list-screen/subscribed-concert-list-screen.tsx index 2031fafe..1b81872d 100644 --- a/apps/billets-app/src/screens/subscribed-concert-list-screen/subscribed-concert-list-screen.tsx +++ b/apps/billets-app/src/screens/subscribed-concert-list-screen/subscribed-concert-list-screen.tsx @@ -17,7 +17,7 @@ const ScreenContent = () => { [navigation], ) return ( - + ) diff --git a/apps/billets-app/src/ui/common-screen-layout/common-screen-layout.tsx b/apps/billets-app/src/ui/common-screen-layout/common-screen-layout.tsx index cf0232e9..2d6a053a 100644 --- a/apps/billets-app/src/ui/common-screen-layout/common-screen-layout.tsx +++ b/apps/billets-app/src/ui/common-screen-layout/common-screen-layout.tsx @@ -9,9 +9,11 @@ export const CommonScreenLayout = ({ children, style, edges = [], + withBottomTab = true, }: PropsWithChildren<{ edges?: Edges style?: StyleProp + withBottomTab?: boolean }>) => { const { semantics } = useColorScheme() const { bottom: bottomInset } = useSafeAreaInsets() @@ -29,7 +31,7 @@ export const CommonScreenLayout = ({ /** * because we set bottom tab bar as position absolute, so we need to calculate individual bottom inset */ - paddingBottom: tabBarHeight - bottomInset, + paddingBottom: withBottomTab ? tabBarHeight - bottomInset : 0, }, ]} > diff --git a/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx b/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx index 6a6eaef7..299d605d 100644 --- a/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx +++ b/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx @@ -101,6 +101,7 @@ export function SubscribedConcertList({ ItemSeparatorComponent={ItemSeparator} contentContainerStyle={{ paddingHorizontal: 16, + paddingBottom: 24, marginTop: 12, backgroundColor: semantics.background[3], }} From 44757d9a14d3d58008757204ce77f922727a8465 Mon Sep 17 00:00:00 2001 From: yungblud Date: Sun, 16 Feb 2025 19:00:24 +0900 Subject: [PATCH 24/41] feat(billets-app): :art: updated api --- .../billets-app/src/lib/api/openapi-client.ts | 36 ++++++++ apps/billets-app/src/types/api.d.ts | 84 ++++++++++++++++++- 2 files changed, 118 insertions(+), 2 deletions(-) diff --git a/apps/billets-app/src/lib/api/openapi-client.ts b/apps/billets-app/src/lib/api/openapi-client.ts index 86d94b78..306f8df4 100644 --- a/apps/billets-app/src/lib/api/openapi-client.ts +++ b/apps/billets-app/src/lib/api/openapi-client.ts @@ -183,6 +183,20 @@ export const apiClient = { 'event', { offset, size }, ], + artistList: ({ offset, size }: { offset?: number; size?: number }) => [ + 'v1', + 'subscribe', + 'list', + 'artist', + { offset, size }, + ], + venueList: ({ offset, size }: { offset?: number; size?: number }) => [ + 'v1', + 'subscribe', + 'list', + 'venue', + { offset, size }, + ], eventSubscribe: ({ eventId }: { eventId: string }) => ['v1', 'subscribe', 'event', { eventId }], artistSubscribe: ({ artistId }: { artistId: string }) => ['v1', 'subscribe', 'artist', { artistId }], venueSubscribe: ({ venueId }: { venueId: string }) => ['v1', 'subscribe', 'venue', { venueId }], @@ -199,6 +213,28 @@ export const apiClient = { } return data.data }, + getArtistList: async (params: { offset: number; size: number }) => { + const data = await fetchClient.GET('/v1/subscribe/artist', { + params: { + query: params, + }, + }) + if (data.error) { + throw new OpenApiError(data.error) + } + return data.data + }, + getVenueList: async (params: { offset: number; size: number }) => { + const data = await fetchClient.GET('/v1/subscribe/venue', { + params: { + query: params, + }, + }) + if (data.error) { + throw new OpenApiError(data.error) + } + return data.data + }, getEvent: async ({ eventId }: { eventId: string }) => { const data = await fetchClient.GET('/v1/subscribe/event/{eventId}', { params: { diff --git a/apps/billets-app/src/types/api.d.ts b/apps/billets-app/src/types/api.d.ts index 2b58a004..2a6ec592 100644 --- a/apps/billets-app/src/types/api.d.ts +++ b/apps/billets-app/src/types/api.d.ts @@ -1114,7 +1114,47 @@ export interface paths { path?: never cookie?: never } - get?: never + get: { + parameters: { + query?: { + offset?: number + size?: number + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ArtistSubscribeDTOSchema'][] + } + } + /** @description Default Response */ + 401: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseDTOSchema'] + } + } + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseDTOSchema'] + } + } + } + } put?: never post: { parameters: { @@ -1577,7 +1617,47 @@ export interface paths { path?: never cookie?: never } - get?: never + get: { + parameters: { + query?: { + offset?: number + size?: number + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Default Response */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['VenueSubscribeDTOSchema'][] + } + } + /** @description Default Response */ + 401: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseDTOSchema'] + } + } + /** @description Default Response */ + 500: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseDTOSchema'] + } + } + } + } put?: never post: { parameters: { From 8f080a691928236f674293cbb52e8125172994a7 Mon Sep 17 00:00:00 2001 From: yungblud Date: Sun, 16 Feb 2025 19:04:38 +0900 Subject: [PATCH 25/41] feat(billets-app): :art: implemented subscribed artist list screen --- .../subscribed-artist-list-screen.hooks.tsx | 6 ++ .../subscribed-artist-list-screen.tsx | 11 ++- .../venue-detail-screen.tsx | 2 +- .../ui/subscribed-artist-list-item/index.ts | 1 + .../subscribed-artist-list-item.tsx | 64 +++++++++++++ .../src/ui/subscribed-artist-list/index.ts | 1 + .../subscribed-artist-list.styles.ts | 11 +++ .../subscribed-artist-list.tsx | 91 +++++++++++++++++++ 8 files changed, 185 insertions(+), 2 deletions(-) create mode 100644 apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.hooks.tsx create mode 100644 apps/billets-app/src/ui/subscribed-artist-list-item/index.ts create mode 100644 apps/billets-app/src/ui/subscribed-artist-list-item/subscribed-artist-list-item.tsx create mode 100644 apps/billets-app/src/ui/subscribed-artist-list/index.ts create mode 100644 apps/billets-app/src/ui/subscribed-artist-list/subscribed-artist-list.styles.ts create mode 100644 apps/billets-app/src/ui/subscribed-artist-list/subscribed-artist-list.tsx diff --git a/apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.hooks.tsx b/apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.hooks.tsx new file mode 100644 index 00000000..ae50d4b2 --- /dev/null +++ b/apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.hooks.tsx @@ -0,0 +1,6 @@ +import { useNavigation, useRoute } from '@react-navigation/native' +import { SubscribedArtistListScreenProps } from './subscribed-artist-list-screen.types' + +export const useSubscribedArtistListScreenNavigation = () => + useNavigation() +export const useSubscribedArtistListRoute = () => useRoute() diff --git a/apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.tsx b/apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.tsx index 0d65daef..2681e703 100644 --- a/apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.tsx +++ b/apps/billets-app/src/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.tsx @@ -1,3 +1,12 @@ import { CommonScreenLayout } from '@/ui' +import { SubscribedArtistList } from '@/ui/subscribed-artist-list' +import { Spinner } from '@coldsurfers/ocean-road/native' +import { Suspense } from 'react' -export const SubscribedArtistListScreen = () => +export const SubscribedArtistListScreen = () => ( + + }> + + + +) diff --git a/apps/billets-app/src/screens/venue-detail-screen/venue-detail-screen.tsx b/apps/billets-app/src/screens/venue-detail-screen/venue-detail-screen.tsx index ddfe72ed..4a17e969 100644 --- a/apps/billets-app/src/screens/venue-detail-screen/venue-detail-screen.tsx +++ b/apps/billets-app/src/screens/venue-detail-screen/venue-detail-screen.tsx @@ -5,7 +5,7 @@ export const VenueDetailScreen = () => { const navigation = useVenueDetailScreenNavigation() const route = useVenueDetailScreenRoute() return ( - + { diff --git a/apps/billets-app/src/ui/subscribed-artist-list-item/index.ts b/apps/billets-app/src/ui/subscribed-artist-list-item/index.ts new file mode 100644 index 00000000..31285044 --- /dev/null +++ b/apps/billets-app/src/ui/subscribed-artist-list-item/index.ts @@ -0,0 +1 @@ +export * from './subscribed-artist-list-item' diff --git a/apps/billets-app/src/ui/subscribed-artist-list-item/subscribed-artist-list-item.tsx b/apps/billets-app/src/ui/subscribed-artist-list-item/subscribed-artist-list-item.tsx new file mode 100644 index 00000000..c5666c2d --- /dev/null +++ b/apps/billets-app/src/ui/subscribed-artist-list-item/subscribed-artist-list-item.tsx @@ -0,0 +1,64 @@ +import { apiClient } from '@/lib/api/openapi-client' +import palettes from '@/lib/palettes' +import { components } from '@/types/api' +import { colors } from '@coldsurfers/ocean-road' +import { Text, useColorScheme } from '@coldsurfers/ocean-road/native' +import { useSuspenseQuery } from '@tanstack/react-query' +import { StyleSheet, TouchableOpacity, View } from 'react-native' +import { SearchItemThumbnail } from '../search-item-thumbnail' + +export function SubscribedArtistListItem({ + data, + onPress, +}: { + data: components['schemas']['ArtistSubscribeDTOSchema'] + onPress: (artistId: string) => void +}) { + const { semantics } = useColorScheme() + const { data: artistDetailData } = useSuspenseQuery({ + queryKey: apiClient.artist.queryKeys.detail(data.artistId), + queryFn: () => apiClient.artist.getArtistDetail(data.artistId), + }) + if (!artistDetailData) { + return null + } + const mainPoster = artistDetailData.thumbUrl + if (!mainPoster) { + return null + } + return ( + onPress(data.artistId)} style={styles.itemWrapper}> + + + + {artistDetailData.name} + + + 아티스트 + + + + ) +} + +const styles = StyleSheet.create({ + itemWrapper: { + flexDirection: 'row', + alignItems: 'center', + paddingVertical: 4, + }, + itemInnerRight: { + marginLeft: 8, + flex: 1, + }, + itemTitle: { fontSize: 14 }, + itemSubtitle: { color: palettes.gray['800'], fontSize: 14 }, + skeletonTitle: { + width: '100%', + backgroundColor: colors.oc.gray[4].value, + height: 24, + marginBottom: 4, + borderRadius: 4, + }, + skeletonSubtitle: { width: '100%', backgroundColor: colors.oc.gray[4].value, height: 16, borderRadius: 4 }, +}) diff --git a/apps/billets-app/src/ui/subscribed-artist-list/index.ts b/apps/billets-app/src/ui/subscribed-artist-list/index.ts new file mode 100644 index 00000000..604523a2 --- /dev/null +++ b/apps/billets-app/src/ui/subscribed-artist-list/index.ts @@ -0,0 +1 @@ +export * from './subscribed-artist-list' diff --git a/apps/billets-app/src/ui/subscribed-artist-list/subscribed-artist-list.styles.ts b/apps/billets-app/src/ui/subscribed-artist-list/subscribed-artist-list.styles.ts new file mode 100644 index 00000000..649b1b12 --- /dev/null +++ b/apps/billets-app/src/ui/subscribed-artist-list/subscribed-artist-list.styles.ts @@ -0,0 +1,11 @@ +import { StyleSheet } from 'react-native' + +export const subscribedArtistListStyles = StyleSheet.create({ + contentContainer: { + paddingHorizontal: 16, + marginTop: 12, + }, + itemSeparator: { + width: 10, + }, +}) diff --git a/apps/billets-app/src/ui/subscribed-artist-list/subscribed-artist-list.tsx b/apps/billets-app/src/ui/subscribed-artist-list/subscribed-artist-list.tsx new file mode 100644 index 00000000..08937a0f --- /dev/null +++ b/apps/billets-app/src/ui/subscribed-artist-list/subscribed-artist-list.tsx @@ -0,0 +1,91 @@ +import { apiClient } from '@/lib/api/openapi-client' +import { useSubscribedArtistListScreenNavigation } from '@/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.hooks' +import { useColorScheme } from '@coldsurfers/ocean-road/native' +import { useSuspenseInfiniteQuery } from '@tanstack/react-query' +import { Suspense, useCallback, useMemo, useState } from 'react' +import { FlatList, ListRenderItem, View } from 'react-native' +import { SubscribedArtistListItem } from '../subscribed-artist-list-item' +import { subscribedArtistListStyles } from './subscribed-artist-list.styles' + +const ItemSeparator = () => + +const PER_PAGE = 20 + +export function SubscribedArtistList({ listHeaderComponent }: { listHeaderComponent?: React.ComponentType }) { + const { semantics } = useColorScheme() + const navigation = useSubscribedArtistListScreenNavigation() + const [isRefreshing, setIsRefreshing] = useState(false) + const { data, fetchNextPage, isFetchingNextPage, isLoading, hasNextPage, isPending, refetch } = + useSuspenseInfiniteQuery({ + initialPageParam: 0, + queryKey: apiClient.subscribe.queryKeys.artistList({}), + queryFn: ({ pageParam = 0 }) => apiClient.subscribe.getArtistList({ offset: pageParam, size: PER_PAGE }), + getNextPageParam: (lastPage, allPages) => { + if (!lastPage) { + return undefined + } + if (lastPage.length < PER_PAGE) { + return undefined + } + return allPages.length * PER_PAGE + }, + }) + const listData = useMemo(() => { + return data?.pages.flat() ?? [] + }, [data]) + const renderItem = useCallback>( + ({ item }) => { + const onPress = () => { + navigation.navigate('ArtistStackNavigation', { + params: { + artistId: item.artistId, + }, + screen: 'ArtistDetailScreen', + }) + } + return ( + + + + ) + }, + [navigation], + ) + + const onEndReached = useCallback(async () => { + if (isFetchingNextPage || isLoading || !hasNextPage || isPending) { + return + } + await fetchNextPage() + }, [fetchNextPage, hasNextPage, isFetchingNextPage, isLoading, isPending]) + + const onRefresh = useCallback(async () => { + setIsRefreshing(true) + await refetch() + setIsRefreshing(false) + }, [refetch]) + + return ( + `${item.artistId}`} + renderItem={renderItem} + ItemSeparatorComponent={ItemSeparator} + contentContainerStyle={{ + paddingHorizontal: 16, + paddingBottom: 24, + marginTop: 12, + backgroundColor: semantics.background[3], + }} + ListHeaderComponent={listHeaderComponent} + onEndReached={onEndReached} + onRefresh={onRefresh} + refreshing={isRefreshing} + showsHorizontalScrollIndicator={false} + showsVerticalScrollIndicator={false} + style={{ + backgroundColor: semantics.background[3], + }} + /> + ) +} From 74864fbb0e09bdf6f5f0f6180cbd6a3dc54d0522 Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 17 Feb 2025 19:37:38 +0900 Subject: [PATCH 26/41] feat(billets-app): :art: implemented venue list --- .../subscribed-venue-list-screen.tsx | 11 ++- .../ui/subscribed-venue-list-item/index.ts | 1 + .../subscribed-venue-list-item.tsx | 60 ++++++++++++ .../src/ui/subscribed-venue-list/index.ts | 1 + .../subscribed-venue-list.styles.ts | 11 +++ .../subscribed-venue-list.tsx | 91 +++++++++++++++++++ 6 files changed, 174 insertions(+), 1 deletion(-) create mode 100644 apps/billets-app/src/ui/subscribed-venue-list-item/index.ts create mode 100644 apps/billets-app/src/ui/subscribed-venue-list-item/subscribed-venue-list-item.tsx create mode 100644 apps/billets-app/src/ui/subscribed-venue-list/index.ts create mode 100644 apps/billets-app/src/ui/subscribed-venue-list/subscribed-venue-list.styles.ts create mode 100644 apps/billets-app/src/ui/subscribed-venue-list/subscribed-venue-list.tsx diff --git a/apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.tsx b/apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.tsx index 1ac42d2f..f7a55a5e 100644 --- a/apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.tsx +++ b/apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.tsx @@ -1,3 +1,12 @@ import { CommonScreenLayout } from '@/ui' +import { SubscribedVenueList } from '@/ui/subscribed-venue-list' +import { Spinner } from '@coldsurfers/ocean-road/native' +import { Suspense } from 'react' -export const SubscribedVenueListScreen = () => +export const SubscribedVenueListScreen = () => ( + + }> + + + +) diff --git a/apps/billets-app/src/ui/subscribed-venue-list-item/index.ts b/apps/billets-app/src/ui/subscribed-venue-list-item/index.ts new file mode 100644 index 00000000..be734b99 --- /dev/null +++ b/apps/billets-app/src/ui/subscribed-venue-list-item/index.ts @@ -0,0 +1 @@ +export * from './subscribed-venue-list-item' diff --git a/apps/billets-app/src/ui/subscribed-venue-list-item/subscribed-venue-list-item.tsx b/apps/billets-app/src/ui/subscribed-venue-list-item/subscribed-venue-list-item.tsx new file mode 100644 index 00000000..b7014e57 --- /dev/null +++ b/apps/billets-app/src/ui/subscribed-venue-list-item/subscribed-venue-list-item.tsx @@ -0,0 +1,60 @@ +import { apiClient } from '@/lib/api/openapi-client' +import palettes from '@/lib/palettes' +import { components } from '@/types/api' +import { colors } from '@coldsurfers/ocean-road' +import { Text, useColorScheme } from '@coldsurfers/ocean-road/native' +import { useSuspenseQuery } from '@tanstack/react-query' +import { StyleSheet, TouchableOpacity, View } from 'react-native' +import { SearchItemThumbnail } from '../search-item-thumbnail' + +export function SubscribedVenueListItem({ + data, + onPress, +}: { + data: components['schemas']['VenueSubscribeDTOSchema'] + onPress: (venueId: string) => void +}) { + const { semantics } = useColorScheme() + const { data: venueDetailData } = useSuspenseQuery({ + queryKey: apiClient.venue.queryKeys.detail(data.venueId), + queryFn: () => apiClient.venue.getVenueDetail(data.venueId), + }) + if (!venueDetailData) { + return null + } + return ( + onPress(data.venueId)} style={styles.itemWrapper}> + + + + {venueDetailData.name} + + + 공연장 + + + + ) +} + +const styles = StyleSheet.create({ + itemWrapper: { + flexDirection: 'row', + alignItems: 'center', + paddingVertical: 4, + }, + itemInnerRight: { + marginLeft: 8, + flex: 1, + }, + itemTitle: { fontSize: 14 }, + itemSubtitle: { color: palettes.gray['800'], fontSize: 14 }, + skeletonTitle: { + width: '100%', + backgroundColor: colors.oc.gray[4].value, + height: 24, + marginBottom: 4, + borderRadius: 4, + }, + skeletonSubtitle: { width: '100%', backgroundColor: colors.oc.gray[4].value, height: 16, borderRadius: 4 }, +}) diff --git a/apps/billets-app/src/ui/subscribed-venue-list/index.ts b/apps/billets-app/src/ui/subscribed-venue-list/index.ts new file mode 100644 index 00000000..ef8d5118 --- /dev/null +++ b/apps/billets-app/src/ui/subscribed-venue-list/index.ts @@ -0,0 +1 @@ +export * from './subscribed-venue-list' diff --git a/apps/billets-app/src/ui/subscribed-venue-list/subscribed-venue-list.styles.ts b/apps/billets-app/src/ui/subscribed-venue-list/subscribed-venue-list.styles.ts new file mode 100644 index 00000000..5eb7cd52 --- /dev/null +++ b/apps/billets-app/src/ui/subscribed-venue-list/subscribed-venue-list.styles.ts @@ -0,0 +1,11 @@ +import { StyleSheet } from 'react-native' + +export const subscribedVenueListStyles = StyleSheet.create({ + contentContainer: { + paddingHorizontal: 16, + marginTop: 12, + }, + itemSeparator: { + width: 10, + }, +}) diff --git a/apps/billets-app/src/ui/subscribed-venue-list/subscribed-venue-list.tsx b/apps/billets-app/src/ui/subscribed-venue-list/subscribed-venue-list.tsx new file mode 100644 index 00000000..a0da7eac --- /dev/null +++ b/apps/billets-app/src/ui/subscribed-venue-list/subscribed-venue-list.tsx @@ -0,0 +1,91 @@ +import { apiClient } from '@/lib/api/openapi-client' +import { useSubscribedArtistListScreenNavigation } from '@/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.hooks' +import { useColorScheme } from '@coldsurfers/ocean-road/native' +import { useSuspenseInfiniteQuery } from '@tanstack/react-query' +import { Suspense, useCallback, useMemo, useState } from 'react' +import { FlatList, ListRenderItem, View } from 'react-native' +import { SubscribedVenueListItem } from '../subscribed-venue-list-item' +import { subscribedVenueListStyles } from './subscribed-venue-list.styles' + +const ItemSeparator = () => + +const PER_PAGE = 20 + +export function SubscribedVenueList({ listHeaderComponent }: { listHeaderComponent?: React.ComponentType }) { + const { semantics } = useColorScheme() + const navigation = useSubscribedArtistListScreenNavigation() + const [isRefreshing, setIsRefreshing] = useState(false) + const { data, fetchNextPage, isFetchingNextPage, isLoading, hasNextPage, isPending, refetch } = + useSuspenseInfiniteQuery({ + initialPageParam: 0, + queryKey: apiClient.subscribe.queryKeys.venueList({}), + queryFn: ({ pageParam = 0 }) => apiClient.subscribe.getVenueList({ offset: pageParam, size: PER_PAGE }), + getNextPageParam: (lastPage, allPages) => { + if (!lastPage) { + return undefined + } + if (lastPage.length < PER_PAGE) { + return undefined + } + return allPages.length * PER_PAGE + }, + }) + const listData = useMemo(() => { + return data?.pages.flat() ?? [] + }, [data]) + const renderItem = useCallback>( + ({ item }) => { + const onPress = () => { + navigation.navigate('VenueStackNavigation', { + params: { + id: item.venueId, + }, + screen: 'VenueDetailScreen', + }) + } + return ( + + + + ) + }, + [navigation], + ) + + const onEndReached = useCallback(async () => { + if (isFetchingNextPage || isLoading || !hasNextPage || isPending) { + return + } + await fetchNextPage() + }, [fetchNextPage, hasNextPage, isFetchingNextPage, isLoading, isPending]) + + const onRefresh = useCallback(async () => { + setIsRefreshing(true) + await refetch() + setIsRefreshing(false) + }, [refetch]) + + return ( + `${item.venueId}`} + renderItem={renderItem} + ItemSeparatorComponent={ItemSeparator} + contentContainerStyle={{ + paddingHorizontal: 16, + paddingBottom: 24, + marginTop: 12, + backgroundColor: semantics.background[3], + }} + ListHeaderComponent={listHeaderComponent} + onEndReached={onEndReached} + onRefresh={onRefresh} + refreshing={isRefreshing} + showsHorizontalScrollIndicator={false} + showsVerticalScrollIndicator={false} + style={{ + backgroundColor: semantics.background[3], + }} + /> + ) +} From e8c48ee629a1d1ee0315f79f5f3aeaca843850ea Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 17 Feb 2025 19:42:40 +0900 Subject: [PATCH 27/41] feat(billets-app): :art: added navigation hooks --- .../src/screens/subscribed-venue-list-screen/index.ts | 1 + .../subscribed-venue-list-screen.hooks.tsx | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.hooks.tsx diff --git a/apps/billets-app/src/screens/subscribed-venue-list-screen/index.ts b/apps/billets-app/src/screens/subscribed-venue-list-screen/index.ts index 85ae593d..4403adcd 100644 --- a/apps/billets-app/src/screens/subscribed-venue-list-screen/index.ts +++ b/apps/billets-app/src/screens/subscribed-venue-list-screen/index.ts @@ -1,2 +1,3 @@ export * from './subscribed-venue-list-screen' +export * from './subscribed-venue-list-screen.hooks' export * from './subscribed-venue-list-screen.types' diff --git a/apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.hooks.tsx b/apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.hooks.tsx new file mode 100644 index 00000000..2b954656 --- /dev/null +++ b/apps/billets-app/src/screens/subscribed-venue-list-screen/subscribed-venue-list-screen.hooks.tsx @@ -0,0 +1,6 @@ +import { useNavigation, useRoute } from '@react-navigation/native' +import { SubscribedVenueListScreenProps } from './subscribed-venue-list-screen.types' + +export const useSubscribedVenueListScreenNavigation = () => + useNavigation() +export const useSubscribedVenueListRoute = () => useRoute() From 9bbae061f07270f11d2dd5ead3207913ec348925 Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 17 Feb 2025 19:42:51 +0900 Subject: [PATCH 28/41] refactor(billets-app): :art: refactored SubscribeInfoMe --- .../subscribe-info-me/subscribe-info-me.tsx | 46 ++++++++++--------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.tsx b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.tsx index 6e77b406..265ddf10 100644 --- a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.tsx +++ b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.tsx @@ -1,11 +1,11 @@ import { apiClient } from '@/lib/api/openapi-client' import { useSuspenseQuery } from '@tanstack/react-query' -import { useMemo } from 'react' -import { FlatList } from 'react-native' +import { memo, useCallback, useMemo } from 'react' +import { FlatList, ListRenderItem, StyleSheet } from 'react-native' import { SubscribeInfoMeItem } from './subscribe-info-me.item' import { InfoMeItemTypeSchema } from './subscribe-info-me.types' -export const SubscribeInfoMe = () => { +export const SubscribeInfoMe = memo(() => { const { data: subscribeInfoMe } = useSuspenseQuery({ queryKey: apiClient.subscribe.queryKeys.infoMe, queryFn: () => apiClient.subscribe.getInfoMe(), @@ -20,28 +20,32 @@ export const SubscribeInfoMe = () => { }), [subscribeInfoMe], ) - console.log(data) + const renderItem = useCallback>(({ item }) => { + const validation = InfoMeItemTypeSchema.safeParse(item.type) + if (!validation.success) { + console.error(validation.error) + return null + } + return + }, []) + return ( { - const validation = InfoMeItemTypeSchema.safeParse(item.type) - if (!validation.success) { - console.error(validation.error) - return null - } - return ( - - ) - }} + renderItem={renderItem} keyExtractor={(item) => `${item.type}`} - style={{ - flex: 1, - }} - contentContainerStyle={{ - paddingHorizontal: 16, - }} + style={styles.list} + contentContainerStyle={styles.contentList} /> ) -} +}) + +const styles = StyleSheet.create({ + list: { + flex: 1, + }, + contentList: { + paddingHorizontal: 16, + }, +}) From 357a652ae3a93766c9fe56c540b579298bf768cb Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 17 Feb 2025 19:46:27 +0900 Subject: [PATCH 29/41] refactor(billets-app): :art: added footer spinner --- .../subscribed-artist-list.tsx | 29 ++++++++++++++----- .../subscribed-concert-list.tsx | 12 ++++++-- .../subscribed-venue-list.tsx | 29 ++++++++++++++----- 3 files changed, 52 insertions(+), 18 deletions(-) diff --git a/apps/billets-app/src/ui/subscribed-artist-list/subscribed-artist-list.tsx b/apps/billets-app/src/ui/subscribed-artist-list/subscribed-artist-list.tsx index 08937a0f..5ad7b47d 100644 --- a/apps/billets-app/src/ui/subscribed-artist-list/subscribed-artist-list.tsx +++ b/apps/billets-app/src/ui/subscribed-artist-list/subscribed-artist-list.tsx @@ -1,9 +1,9 @@ import { apiClient } from '@/lib/api/openapi-client' import { useSubscribedArtistListScreenNavigation } from '@/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.hooks' -import { useColorScheme } from '@coldsurfers/ocean-road/native' +import { Spinner, useColorScheme } from '@coldsurfers/ocean-road/native' import { useSuspenseInfiniteQuery } from '@tanstack/react-query' import { Suspense, useCallback, useMemo, useState } from 'react' -import { FlatList, ListRenderItem, View } from 'react-native' +import { FlatList, ListRenderItem, StyleSheet, View } from 'react-native' import { SubscribedArtistListItem } from '../subscribed-artist-list-item' import { subscribedArtistListStyles } from './subscribed-artist-list.styles' @@ -71,12 +71,14 @@ export function SubscribedArtistList({ listHeaderComponent }: { listHeaderCompon keyExtractor={(item) => `${item.artistId}`} renderItem={renderItem} ItemSeparatorComponent={ItemSeparator} - contentContainerStyle={{ - paddingHorizontal: 16, - paddingBottom: 24, - marginTop: 12, - backgroundColor: semantics.background[3], - }} + contentContainerStyle={[ + { + backgroundColor: semantics.background[3], + }, + styles.contentContainer, + ]} + ListFooterComponent={isFetchingNextPage ? : null} + ListFooterComponentStyle={styles.listFooter} ListHeaderComponent={listHeaderComponent} onEndReached={onEndReached} onRefresh={onRefresh} @@ -89,3 +91,14 @@ export function SubscribedArtistList({ listHeaderComponent }: { listHeaderCompon /> ) } + +const styles = StyleSheet.create({ + contentContainer: { + paddingHorizontal: 16, + paddingBottom: 24, + marginTop: 12, + }, + listFooter: { + paddingBottom: 24, + }, +}) diff --git a/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx b/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx index 299d605d..a4a2d41b 100644 --- a/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx +++ b/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx @@ -1,8 +1,8 @@ import { apiClient } from '@/lib/api/openapi-client' -import { useColorScheme } from '@coldsurfers/ocean-road/native' +import { Spinner, useColorScheme } from '@coldsurfers/ocean-road/native' import { useSuspenseInfiniteQuery } from '@tanstack/react-query' import { Suspense, useCallback, useMemo, useState } from 'react' -import { FlatList, ListRenderItem, View } from 'react-native' +import { FlatList, ListRenderItem, StyleSheet, View } from 'react-native' import { ConcertListItem } from '../concert-list-item' import { SubscribedConcertListItem } from '../subscribed-concert-list-item' import { subscribedConcertListStyles } from './subscribed-concert-list.styles' @@ -105,6 +105,8 @@ export function SubscribedConcertList({ marginTop: 12, backgroundColor: semantics.background[3], }} + ListFooterComponent={isFetchingNextPage ? : null} + ListFooterComponentStyle={styles.listFooter} ListHeaderComponent={listHeaderComponent} onEndReached={horizontal ? undefined : onEndReached} onRefresh={horizontal ? undefined : onRefresh} @@ -118,3 +120,9 @@ export function SubscribedConcertList({ /> ) } + +const styles = StyleSheet.create({ + listFooter: { + paddingBottom: 24, + }, +}) diff --git a/apps/billets-app/src/ui/subscribed-venue-list/subscribed-venue-list.tsx b/apps/billets-app/src/ui/subscribed-venue-list/subscribed-venue-list.tsx index a0da7eac..336af1ad 100644 --- a/apps/billets-app/src/ui/subscribed-venue-list/subscribed-venue-list.tsx +++ b/apps/billets-app/src/ui/subscribed-venue-list/subscribed-venue-list.tsx @@ -1,9 +1,9 @@ import { apiClient } from '@/lib/api/openapi-client' import { useSubscribedArtistListScreenNavigation } from '@/screens/subscribed-artist-list-screen/subscribed-artist-list-screen.hooks' -import { useColorScheme } from '@coldsurfers/ocean-road/native' +import { Spinner, useColorScheme } from '@coldsurfers/ocean-road/native' import { useSuspenseInfiniteQuery } from '@tanstack/react-query' import { Suspense, useCallback, useMemo, useState } from 'react' -import { FlatList, ListRenderItem, View } from 'react-native' +import { FlatList, ListRenderItem, StyleSheet, View } from 'react-native' import { SubscribedVenueListItem } from '../subscribed-venue-list-item' import { subscribedVenueListStyles } from './subscribed-venue-list.styles' @@ -71,13 +71,15 @@ export function SubscribedVenueList({ listHeaderComponent }: { listHeaderCompone keyExtractor={(item) => `${item.venueId}`} renderItem={renderItem} ItemSeparatorComponent={ItemSeparator} - contentContainerStyle={{ - paddingHorizontal: 16, - paddingBottom: 24, - marginTop: 12, - backgroundColor: semantics.background[3], - }} + contentContainerStyle={[ + { + backgroundColor: semantics.background[3], + }, + styles.contentContainer, + ]} ListHeaderComponent={listHeaderComponent} + ListFooterComponent={isFetchingNextPage ? : null} + ListFooterComponentStyle={styles.listFooter} onEndReached={onEndReached} onRefresh={onRefresh} refreshing={isRefreshing} @@ -89,3 +91,14 @@ export function SubscribedVenueList({ listHeaderComponent }: { listHeaderCompone /> ) } + +const styles = StyleSheet.create({ + contentContainer: { + paddingHorizontal: 16, + paddingBottom: 24, + marginTop: 12, + }, + listFooter: { + paddingBottom: 24, + }, +}) From 03aad3de106368f59a0fa11e8caf38908e77e224 Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 17 Feb 2025 19:47:35 +0900 Subject: [PATCH 30/41] refactor(billets-app): :art: memoize SubscribeInfoMeItem --- .../subscribe-info-me.item.tsx | 96 +++++++++---------- 1 file changed, 45 insertions(+), 51 deletions(-) diff --git a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx index 720d6ef5..b8c99eff 100644 --- a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx +++ b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx @@ -1,6 +1,6 @@ import { useMyScreenNavigation } from '@/screens/my-screen' import { Text, useColorScheme } from '@coldsurfers/ocean-road/native' -import { useCallback, useMemo } from 'react' +import { memo, useCallback, useMemo } from 'react' import { match } from 'ts-pattern' import { z } from 'zod' import { @@ -17,57 +17,51 @@ const refineCount = (count: number) => { return count } -export const SubscribeInfoMeItem = ({ - type, - count, - thumbUrl, -}: { - type: z.infer - count: number - thumbUrl?: string -}) => { - const { semantics } = useColorScheme() - const refinedCount = useMemo(() => refineCount(count), [count]) - const navigation = useMyScreenNavigation() +export const SubscribeInfoMeItem = memo( + ({ type, count, thumbUrl }: { type: z.infer; count: number; thumbUrl?: string }) => { + const { semantics } = useColorScheme() + const refinedCount = useMemo(() => refineCount(count), [count]) + const navigation = useMyScreenNavigation() - const onPress = useCallback(() => { - match(type) - .with('artists', () => { - navigation.navigate('SubscribedStackNavigation', { - screen: 'SubscribedArtistListScreen', - params: {}, + const onPress = useCallback(() => { + match(type) + .with('artists', () => { + navigation.navigate('SubscribedStackNavigation', { + screen: 'SubscribedArtistListScreen', + params: {}, + }) }) - }) - .with('events', () => { - navigation.navigate('SubscribedStackNavigation', { - screen: 'SubscribedConcertListScreen', - params: {}, + .with('events', () => { + navigation.navigate('SubscribedStackNavigation', { + screen: 'SubscribedConcertListScreen', + params: {}, + }) }) - }) - .with('venues', () => { - navigation.navigate('SubscribedStackNavigation', { - screen: 'SubscribedVenueListScreen', - params: {}, + .with('venues', () => { + navigation.navigate('SubscribedStackNavigation', { + screen: 'SubscribedVenueListScreen', + params: {}, + }) }) - }) - .exhaustive() - }, [navigation, type]) - return ( - - - - - - {match(type) - .with('artists', () => `${refinedCount} 아티스트`) - .with('events', () => `${refinedCount} 공연`) - .with('venues', () => `${refinedCount} 공연장`) - .exhaustive()} - - - ) -} + .exhaustive() + }, [navigation, type]) + return ( + + + + + + {match(type) + .with('artists', () => `${refinedCount} 아티스트`) + .with('events', () => `${refinedCount} 공연`) + .with('venues', () => `${refinedCount} 공연장`) + .exhaustive()} + + + ) + }, +) From 91a678926d4c8528db73b0e33b579faa6de8da29 Mon Sep 17 00:00:00 2001 From: yungblud Date: Mon, 17 Feb 2025 19:48:39 +0900 Subject: [PATCH 31/41] refactor(billets-app): :art: styles --- .../subscribed-concert-list.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx b/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx index a4a2d41b..9edcaa66 100644 --- a/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx +++ b/apps/billets-app/src/ui/subscribed-concert-list/subscribed-concert-list.tsx @@ -99,12 +99,12 @@ export function SubscribedConcertList({ keyExtractor={(item) => `${item.eventId}`} renderItem={renderItem} ItemSeparatorComponent={ItemSeparator} - contentContainerStyle={{ - paddingHorizontal: 16, - paddingBottom: 24, - marginTop: 12, - backgroundColor: semantics.background[3], - }} + contentContainerStyle={[ + { + backgroundColor: semantics.background[3], + }, + styles.contentContainer, + ]} ListFooterComponent={isFetchingNextPage ? : null} ListFooterComponentStyle={styles.listFooter} ListHeaderComponent={listHeaderComponent} @@ -122,6 +122,7 @@ export function SubscribedConcertList({ } const styles = StyleSheet.create({ + contentContainer: { paddingHorizontal: 16, paddingBottom: 24, marginTop: 12 }, listFooter: { paddingBottom: 24, }, From 64785a50b098ac90bb8b44dbd54164602dfbe815 Mon Sep 17 00:00:00 2001 From: yungblud Date: Tue, 18 Feb 2025 20:05:06 +0900 Subject: [PATCH 32/41] feat(billets-app): :art: added localeCompare --- .../subscribe-info-me/subscribe-info-me.item.tsx | 2 +- .../src/ui/subscribe-info-me/subscribe-info-me.tsx | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx index b8c99eff..6937a749 100644 --- a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx +++ b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.item.tsx @@ -52,7 +52,7 @@ export const SubscribeInfoMeItem = memo( borderColor: semantics.border[1], }} > - + {thumbUrl ? : null} {match(type) diff --git a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.tsx b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.tsx index 265ddf10..9897e012 100644 --- a/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.tsx +++ b/apps/billets-app/src/ui/subscribe-info-me/subscribe-info-me.tsx @@ -12,12 +12,14 @@ export const SubscribeInfoMe = memo(() => { }) const data = useMemo( () => - Object.entries(subscribeInfoMe).map(([key, value]) => { - return { - type: key, - value, - } - }), + Object.entries(subscribeInfoMe) + .map(([key, value]) => { + return { + type: key, + value, + } + }) + .sort((a, b) => a.type.localeCompare(b.type)), [subscribeInfoMe], ) const renderItem = useCallback>(({ item }) => { From f66a2f93f9851ae8593db6371b6a69941414d2e6 Mon Sep 17 00:00:00 2001 From: yungblud Date: Tue, 18 Feb 2025 20:06:25 +0900 Subject: [PATCH 33/41] feat(billets-app): :art: implemented eventCategory --- apps/billets-app/src/lib/api/openapi-client.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/billets-app/src/lib/api/openapi-client.ts b/apps/billets-app/src/lib/api/openapi-client.ts index 306f8df4..ebd14a11 100644 --- a/apps/billets-app/src/lib/api/openapi-client.ts +++ b/apps/billets-app/src/lib/api/openapi-client.ts @@ -447,6 +447,19 @@ export const apiClient = { return data.data }, }, + eventCategory: { + queryKeys: { + all: ['event-category'], + list: ['event-category', 'list'], + }, + getEventCategories: async () => { + const response = await fetchClient.GET('/v1/event-category/') + if (response.error) { + throw new OpenApiError(response.error) + } + return response.data + }, + }, location: { queryKeys: { country: { From ea2d74513d6d07ea167c998b0775441833380c59 Mon Sep 17 00:00:00 2001 From: yungblud Date: Tue, 18 Feb 2025 21:14:18 +0900 Subject: [PATCH 34/41] feat(billets-app): :art: implemented home event category Menu with section list --- .../src/screens/home-screen/home-screen.tsx | 42 +++++++++++++- .../event-category-list.item.tsx | 56 +++++++++++++++++++ .../event-category-list.styled.ts | 22 ++++++++ .../event-category-list.tsx | 22 ++++++++ .../src/ui/event-category-list/index.ts | 1 + 5 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 apps/billets-app/src/ui/event-category-list/event-category-list.item.tsx create mode 100644 apps/billets-app/src/ui/event-category-list/event-category-list.styled.ts create mode 100644 apps/billets-app/src/ui/event-category-list/event-category-list.tsx create mode 100644 apps/billets-app/src/ui/event-category-list/index.ts diff --git a/apps/billets-app/src/screens/home-screen/home-screen.tsx b/apps/billets-app/src/screens/home-screen/home-screen.tsx index c1ae3d07..20b389a0 100644 --- a/apps/billets-app/src/screens/home-screen/home-screen.tsx +++ b/apps/billets-app/src/screens/home-screen/home-screen.tsx @@ -10,14 +10,24 @@ import { LocationSelectorModal, } from '@/ui' import { ConcertListItemType } from '@/ui/concert-list/concert-list.types' +import { EventCategoryList } from '@/ui/event-category-list' import { useScrollToTop } from '@react-navigation/native' import { PerformanceMeasureView, RenderStateProps, useStartProfiler } from '@shopify/react-native-performance' import { useQuery } from '@tanstack/react-query' import { Suspense, useCallback, useRef, useState } from 'react' -import { FlatList, View } from 'react-native' +import { FlatList, ListRenderItem, SectionList, StyleSheet, View } from 'react-native' import { useShallow } from 'zustand/shallow' import { useHomeScreenNavigation } from './home-screen.hooks' +const sections = [ + { + data: ['menu'], + }, + { + data: ['list'], + }, +] as const + const SuspenseHomeScreen = () => { const startNavigationTTITimer = useStartProfiler() const navigation = useHomeScreenNavigation() @@ -97,13 +107,32 @@ const SuspenseHomeScreen = () => { setLocationModalVisible(true) }, []) + const renderItem: ListRenderItem<(typeof sections)[number]['data'][number]> = useCallback( + (info) => { + if (info.item === 'menu') { + return + } + if (info.item === 'list') { + return + } + return null + }, + [onPressConcertListItem, onPressSubscribe], + ) + return ( {latitude === null && longitude === null && } + {latitude !== null && longitude !== null && ( }> - + )} @@ -137,3 +166,12 @@ export const HomeScreen = () => { ) } + +const styles = StyleSheet.create({ + contentContainer: { + paddingHorizontal: 12, + paddingBottom: 64, + flexGrow: 1, + }, + list: { flex: 1 }, +}) diff --git a/apps/billets-app/src/ui/event-category-list/event-category-list.item.tsx b/apps/billets-app/src/ui/event-category-list/event-category-list.item.tsx new file mode 100644 index 00000000..2bda9ad1 --- /dev/null +++ b/apps/billets-app/src/ui/event-category-list/event-category-list.item.tsx @@ -0,0 +1,56 @@ +import { components } from '@/types/api' +import { useColorScheme } from '@coldsurfers/ocean-road/native' +import { memo } from 'react' +import { + DanceIcon, + MicVocalIcon, + StyledEventCategoryButton, + StyledEventCategoryButtonText, + TheatreIcon, +} from './event-category-list.styled' + +// @TODO: same name with billets-web +const getEventCategoryUIName = (originalName: string) => { + switch (originalName) { + case 'Gigs': + return '콘서트' + case 'Theatre': + return '연극 / 뮤지컬' + case 'Dance': + return '무용' + default: + return originalName + } +} + +// @TODO: same name with billets-web +const getUiIcon = (name: string) => { + // eslint-disable-next-line react-hooks/rules-of-hooks + const { semantics } = useColorScheme() + switch (name) { + case 'Gigs': + return + case 'Theatre': + return + case 'Dance': + return + default: + return '' + } +} + +export const EventCategoryListItem = memo((props: components['schemas']['EventCategoryDTOSchema']) => { + const { semantics } = useColorScheme() + return ( + + {getUiIcon(props.name)} + + {getEventCategoryUIName(props.name)} + + + ) +}) diff --git a/apps/billets-app/src/ui/event-category-list/event-category-list.styled.ts b/apps/billets-app/src/ui/event-category-list/event-category-list.styled.ts new file mode 100644 index 00000000..4eb23718 --- /dev/null +++ b/apps/billets-app/src/ui/event-category-list/event-category-list.styled.ts @@ -0,0 +1,22 @@ +import { Text } from '@coldsurfers/ocean-road/native' +import styled from '@emotion/native' +import { Disc3, MicVocal, VenetianMask } from 'lucide-react-native' + +export const StyledEventCategoryButton = styled.TouchableOpacity` + flex-direction: row; + align-items: center; + border-radius: 8px; + padding-vertical: 12px; + padding-horizontal: 12px; + margin-right: 8px; +` +export const StyledEventCategoryButtonText = styled(Text)` + margin-left: 4px; + font-size: 12px; +` + +export const MicVocalIcon = styled(MicVocal)`` + +export const TheatreIcon = styled(VenetianMask)`` + +export const DanceIcon = styled(Disc3)`` diff --git a/apps/billets-app/src/ui/event-category-list/event-category-list.tsx b/apps/billets-app/src/ui/event-category-list/event-category-list.tsx new file mode 100644 index 00000000..2f05b268 --- /dev/null +++ b/apps/billets-app/src/ui/event-category-list/event-category-list.tsx @@ -0,0 +1,22 @@ +import { apiClient } from '@/lib/api/openapi-client' +import { useQuery } from '@tanstack/react-query' +import { memo, useMemo } from 'react' +import { FlatList } from 'react-native' +import { EventCategoryListItem } from './event-category-list.item' + +export const EventCategoryList = memo(() => { + const { data: eventCategoriesData } = useQuery({ + queryKey: apiClient.eventCategory.queryKeys.list, + queryFn: () => apiClient.eventCategory.getEventCategories(), + }) + const data = useMemo(() => eventCategoriesData ?? [], [eventCategoriesData]) + return ( + } + keyExtractor={(item) => `${item.id}`} + style={{ marginBottom: 12 }} + /> + ) +}) diff --git a/apps/billets-app/src/ui/event-category-list/index.ts b/apps/billets-app/src/ui/event-category-list/index.ts new file mode 100644 index 00000000..832b6c53 --- /dev/null +++ b/apps/billets-app/src/ui/event-category-list/index.ts @@ -0,0 +1 @@ +export * from './event-category-list' From c20e54baf9d24c83b15c73e29e2523107d5daf7f Mon Sep 17 00:00:00 2001 From: yungblud Date: Tue, 18 Feb 2025 21:18:45 +0900 Subject: [PATCH 35/41] feat(billets-app): :art: implemented EventCategoryScreen --- apps/billets-app/src/lib/navigations/constants.ts | 6 ++++++ .../home-stack-navigation/home-stack-navigation.tsx | 9 +++++++++ .../home-stack-navigation/home-stack-navigation.types.ts | 2 ++ .../event-category-screen/event-category-screen.hooks.ts | 5 +++++ .../event-category-screen/event-category-screen.tsx | 1 + .../event-category-screen/event-category-screen.types.ts | 5 +++++ .../src/screens/event-category-screen/index.ts | 3 +++ 7 files changed, 31 insertions(+) create mode 100644 apps/billets-app/src/screens/event-category-screen/event-category-screen.hooks.ts create mode 100644 apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx create mode 100644 apps/billets-app/src/screens/event-category-screen/event-category-screen.types.ts create mode 100644 apps/billets-app/src/screens/event-category-screen/index.ts diff --git a/apps/billets-app/src/lib/navigations/constants.ts b/apps/billets-app/src/lib/navigations/constants.ts index 34877546..c2357b89 100644 --- a/apps/billets-app/src/lib/navigations/constants.ts +++ b/apps/billets-app/src/lib/navigations/constants.ts @@ -133,4 +133,10 @@ export const zodScreen = createZodScreen({ name: 'SettingsScreen', params: z.object({}), }, + EventCategoryScreen: { + name: 'EventCategoryScreen', + params: z.object({ + eventCategory: z.string(), + }), + }, } as const) diff --git a/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.tsx b/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.tsx index 44943920..33e15050 100644 --- a/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.tsx +++ b/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.tsx @@ -1,4 +1,5 @@ import { HomeScreen, LocationSelectionScreen } from '@/screens' +import { EventCategoryScreen } from '@/screens/event-category-screen' import { createNativeStackNavigator } from '@react-navigation/native-stack' import React from 'react' import { HomeStackParamList } from './home-stack-navigation.types' @@ -23,6 +24,14 @@ export const HomeStackNavigation = () => { presentation: 'modal', }} /> + null, + presentation: 'card', + }} + /> ) } diff --git a/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.types.ts b/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.types.ts index 86d545c8..ed232618 100644 --- a/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.types.ts +++ b/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.types.ts @@ -1,5 +1,6 @@ import { ZodNavigationParamList, ZodNavigationParams } from '@/lib' import { HomeScreenParams, LocationSelectionScreenParams } from '@/screens' +import { EventCategoryScreenParams } from '@/screens/event-category-screen' import { CompositeScreenProps } from '@react-navigation/native' import { NativeStackScreenProps } from '@react-navigation/native-stack' import { zodNavigation, zodScreen } from '../../lib/navigations/constants' @@ -10,6 +11,7 @@ export type HomeStackParams = ZodNavigationParams export type HomeStackScreenProps = CompositeScreenProps< diff --git a/apps/billets-app/src/screens/event-category-screen/event-category-screen.hooks.ts b/apps/billets-app/src/screens/event-category-screen/event-category-screen.hooks.ts new file mode 100644 index 00000000..444788a5 --- /dev/null +++ b/apps/billets-app/src/screens/event-category-screen/event-category-screen.hooks.ts @@ -0,0 +1,5 @@ +import { EventCategoryScreenProps } from '@/screens/event-category-screen' +import { useNavigation, useRoute } from '@react-navigation/native' + +export const useEventCategoryScreenNavigation = () => useNavigation() +export const useEventCategoryScreenRoute = () => useRoute() diff --git a/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx b/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx new file mode 100644 index 00000000..1c5b0cdb --- /dev/null +++ b/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx @@ -0,0 +1 @@ +export const EventCategoryScreen = () => null diff --git a/apps/billets-app/src/screens/event-category-screen/event-category-screen.types.ts b/apps/billets-app/src/screens/event-category-screen/event-category-screen.types.ts new file mode 100644 index 00000000..3dd9a4fd --- /dev/null +++ b/apps/billets-app/src/screens/event-category-screen/event-category-screen.types.ts @@ -0,0 +1,5 @@ +import { zodScreen, ZodScreenParams } from '@/lib' +import { HomeStackScreenProps } from '../../navigations/home-stack-navigation/home-stack-navigation.types' + +export type EventCategoryScreenParams = ZodScreenParams +export type EventCategoryScreenProps = HomeStackScreenProps diff --git a/apps/billets-app/src/screens/event-category-screen/index.ts b/apps/billets-app/src/screens/event-category-screen/index.ts new file mode 100644 index 00000000..651f9467 --- /dev/null +++ b/apps/billets-app/src/screens/event-category-screen/index.ts @@ -0,0 +1,3 @@ +export * from './event-category-screen' +export * from './event-category-screen.hooks' +export * from './event-category-screen.types' From 049178ac13ed8ca108aea0126b1ea4d34d1d879e Mon Sep 17 00:00:00 2001 From: yungblud Date: Tue, 18 Feb 2025 21:26:24 +0900 Subject: [PATCH 36/41] feat(billets-app): :art: implemented EventStack --- .../src/lib/utils.event-category.ts | 13 +++++++++ .../event-stack-navigation.tsx | 24 ++++++++++++++++ .../event-stack-navigation.types.ts | 2 ++ .../home-stack-navigation.tsx | 9 ------ .../home-stack-navigation.types.ts | 2 -- .../event-category-screen.tsx | 4 ++- .../event-category-screen.types.ts | 6 ++-- .../event-category-list.item.tsx | 28 +++++++++---------- 8 files changed, 58 insertions(+), 30 deletions(-) create mode 100644 apps/billets-app/src/lib/utils.event-category.ts diff --git a/apps/billets-app/src/lib/utils.event-category.ts b/apps/billets-app/src/lib/utils.event-category.ts new file mode 100644 index 00000000..7c9aab8d --- /dev/null +++ b/apps/billets-app/src/lib/utils.event-category.ts @@ -0,0 +1,13 @@ +// @TODO: same name with billets-web +export const getEventCategoryUIName = (originalName: string) => { + switch (originalName) { + case 'Gigs': + return '콘서트' + case 'Theatre': + return '연극 / 뮤지컬' + case 'Dance': + return '무용' + default: + return originalName + } +} diff --git a/apps/billets-app/src/navigations/event-stack-navigation/event-stack-navigation.tsx b/apps/billets-app/src/navigations/event-stack-navigation/event-stack-navigation.tsx index 698d5d94..68ae9f2e 100644 --- a/apps/billets-app/src/navigations/event-stack-navigation/event-stack-navigation.tsx +++ b/apps/billets-app/src/navigations/event-stack-navigation/event-stack-navigation.tsx @@ -1,7 +1,11 @@ +import { zodScreen } from '@/lib' +import { getEventCategoryUIName } from '@/lib/utils.event-category' import { ConcertTicketListScreen, EventDetailScreen } from '@/screens' +import { EventCategoryScreen } from '@/screens/event-category-screen' import { NavigationHeader } from '@/ui' import { createNativeStackNavigator } from '@react-navigation/native-stack' import React from 'react' +import { z } from 'zod' import { EventStackParamList } from './event-stack-navigation.types' const Stack = createNativeStackNavigator() @@ -47,6 +51,26 @@ export const EventStackNavigation = () => { ), }} /> + ( + )['eventCategory'], + ), + }} + /> + ), + }} + /> ) } diff --git a/apps/billets-app/src/navigations/event-stack-navigation/event-stack-navigation.types.ts b/apps/billets-app/src/navigations/event-stack-navigation/event-stack-navigation.types.ts index d09d312c..a02fea7b 100644 --- a/apps/billets-app/src/navigations/event-stack-navigation/event-stack-navigation.types.ts +++ b/apps/billets-app/src/navigations/event-stack-navigation/event-stack-navigation.types.ts @@ -1,5 +1,6 @@ import { zodNavigation, ZodNavigationParamList, ZodNavigationParams, zodScreen } from '@/lib' import { ConcertTicketListScreenParams, EventDetailScreenParams } from '@/screens' +import { EventCategoryScreenParams } from '@/screens/event-category-screen' import { CompositeScreenProps } from '@react-navigation/native' import { NativeStackScreenProps } from '@react-navigation/native-stack' import { MainStackScreenProps } from '../main-stack-navigation' @@ -9,6 +10,7 @@ export type EventStackParams = ZodNavigationParams export type EventStackScreenProps = CompositeScreenProps< diff --git a/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.tsx b/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.tsx index 33e15050..44943920 100644 --- a/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.tsx +++ b/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.tsx @@ -1,5 +1,4 @@ import { HomeScreen, LocationSelectionScreen } from '@/screens' -import { EventCategoryScreen } from '@/screens/event-category-screen' import { createNativeStackNavigator } from '@react-navigation/native-stack' import React from 'react' import { HomeStackParamList } from './home-stack-navigation.types' @@ -24,14 +23,6 @@ export const HomeStackNavigation = () => { presentation: 'modal', }} /> - null, - presentation: 'card', - }} - /> ) } diff --git a/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.types.ts b/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.types.ts index ed232618..86d545c8 100644 --- a/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.types.ts +++ b/apps/billets-app/src/navigations/home-stack-navigation/home-stack-navigation.types.ts @@ -1,6 +1,5 @@ import { ZodNavigationParamList, ZodNavigationParams } from '@/lib' import { HomeScreenParams, LocationSelectionScreenParams } from '@/screens' -import { EventCategoryScreenParams } from '@/screens/event-category-screen' import { CompositeScreenProps } from '@react-navigation/native' import { NativeStackScreenProps } from '@react-navigation/native-stack' import { zodNavigation, zodScreen } from '../../lib/navigations/constants' @@ -11,7 +10,6 @@ export type HomeStackParams = ZodNavigationParams export type HomeStackScreenProps = CompositeScreenProps< diff --git a/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx b/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx index 1c5b0cdb..b2929a6d 100644 --- a/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx +++ b/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx @@ -1 +1,3 @@ -export const EventCategoryScreen = () => null +import { CommonScreenLayout } from '@/ui' + +export const EventCategoryScreen = () => diff --git a/apps/billets-app/src/screens/event-category-screen/event-category-screen.types.ts b/apps/billets-app/src/screens/event-category-screen/event-category-screen.types.ts index 3dd9a4fd..39bdbaa2 100644 --- a/apps/billets-app/src/screens/event-category-screen/event-category-screen.types.ts +++ b/apps/billets-app/src/screens/event-category-screen/event-category-screen.types.ts @@ -1,5 +1,5 @@ -import { zodScreen, ZodScreenParams } from '@/lib' -import { HomeStackScreenProps } from '../../navigations/home-stack-navigation/home-stack-navigation.types' +import { zodScreen, ZodScreenParams } from '@/lib/navigations' +import { EventStackScreenProps } from '@/navigations/event-stack-navigation' export type EventCategoryScreenParams = ZodScreenParams -export type EventCategoryScreenProps = HomeStackScreenProps +export type EventCategoryScreenProps = EventStackScreenProps diff --git a/apps/billets-app/src/ui/event-category-list/event-category-list.item.tsx b/apps/billets-app/src/ui/event-category-list/event-category-list.item.tsx index 2bda9ad1..dc94c808 100644 --- a/apps/billets-app/src/ui/event-category-list/event-category-list.item.tsx +++ b/apps/billets-app/src/ui/event-category-list/event-category-list.item.tsx @@ -1,6 +1,8 @@ +import { getEventCategoryUIName } from '@/lib/utils.event-category' +import { useHomeScreenNavigation } from '@/screens' import { components } from '@/types/api' import { useColorScheme } from '@coldsurfers/ocean-road/native' -import { memo } from 'react' +import { memo, useCallback } from 'react' import { DanceIcon, MicVocalIcon, @@ -9,20 +11,6 @@ import { TheatreIcon, } from './event-category-list.styled' -// @TODO: same name with billets-web -const getEventCategoryUIName = (originalName: string) => { - switch (originalName) { - case 'Gigs': - return '콘서트' - case 'Theatre': - return '연극 / 뮤지컬' - case 'Dance': - return '무용' - default: - return originalName - } -} - // @TODO: same name with billets-web const getUiIcon = (name: string) => { // eslint-disable-next-line react-hooks/rules-of-hooks @@ -41,8 +29,18 @@ const getUiIcon = (name: string) => { export const EventCategoryListItem = memo((props: components['schemas']['EventCategoryDTOSchema']) => { const { semantics } = useColorScheme() + const navigation = useHomeScreenNavigation() + const onPress = useCallback(() => { + navigation.navigate('EventStackNavigation', { + params: { + eventCategory: props.name, + }, + screen: 'EventCategoryScreen', + }) + }, [navigation, props.name]) return ( Date: Tue, 18 Feb 2025 21:31:33 +0900 Subject: [PATCH 37/41] feat(billets-app): :art: implemented eventCategoryName with api client --- apps/billets-app/src/lib/api/openapi-client.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/billets-app/src/lib/api/openapi-client.ts b/apps/billets-app/src/lib/api/openapi-client.ts index ebd14a11..bc58a80c 100644 --- a/apps/billets-app/src/lib/api/openapi-client.ts +++ b/apps/billets-app/src/lib/api/openapi-client.ts @@ -395,13 +395,15 @@ export const apiClient = { offset, size, locationCityId, + eventCategoryName, }: { latitude?: number longitude?: number locationCityId?: string offset?: number size?: number - }) => ['v1', 'event', ' list', { latitude, longitude, offset, size, locationCityId }], + eventCategoryName?: string + }) => ['v1', 'event', ' list', { latitude, longitude, offset, size, locationCityId, eventCategoryName }], detail: ({ eventId }: { eventId: string }) => ['v1', 'event', 'detail', { eventId }], }, getList: async ({ @@ -410,12 +412,14 @@ export const apiClient = { offset, size, locationCityId, + eventCategoryName, }: { latitude?: number longitude?: number offset: number size: number locationCityId?: string + eventCategoryName?: string }) => { const data = await fetchClient.GET('/v1/event/', { params: { @@ -425,6 +429,7 @@ export const apiClient = { offset, size, locationCityId, + eventCategoryName, }, }, }) From ecb2e296c9b14c3343c65a1cb58507519af57bc3 Mon Sep 17 00:00:00 2001 From: yungblud Date: Tue, 18 Feb 2025 21:34:00 +0900 Subject: [PATCH 38/41] feat(billets-app): :art: implemented event category screen list --- .../event-category-screen.tsx | 25 +- .../src/ui/concert-list/concert-list.tsx | 221 +++++++++--------- 2 files changed, 140 insertions(+), 106 deletions(-) diff --git a/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx b/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx index b2929a6d..a55be15c 100644 --- a/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx +++ b/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx @@ -1,3 +1,24 @@ -import { CommonScreenLayout } from '@/ui' +import { CommonScreenLayout, ConcertList } from '@/ui' +import { Spinner } from '@coldsurfers/ocean-road/native' +import { Suspense, useCallback } from 'react' +import { useEventCategoryScreenNavigation, useEventCategoryScreenRoute } from './event-category-screen.hooks' -export const EventCategoryScreen = () => +export const EventCategoryScreen = () => { + const route = useEventCategoryScreenRoute() + const navigation = useEventCategoryScreenNavigation() + const onPressItem = useCallback( + (eventId: string) => { + navigation.navigate('EventDetailScreen', { + eventId, + }) + }, + [navigation], + ) + return ( + + }> + onPressItem(item.id)} /> + + + ) +} diff --git a/apps/billets-app/src/ui/concert-list/concert-list.tsx b/apps/billets-app/src/ui/concert-list/concert-list.tsx index ae67b6d2..71409235 100644 --- a/apps/billets-app/src/ui/concert-list/concert-list.tsx +++ b/apps/billets-app/src/ui/concert-list/concert-list.tsx @@ -15,119 +15,132 @@ import { ConcertListItemType } from './concert-list.types' type ConcertListProps = { onPressItem?: (item: ConcertListItemType) => void onPressSubscribe?: (item: ConcertListItemType, options: { isSubscribed: boolean }) => void + eventCategory?: string } const PER_PAGE = 20 -export const ConcertList = forwardRef(({ onPressItem, onPressSubscribe }, ref) => { - const [isRefreshing, setIsRefreshing] = useState(false) - const { latitude, longitude, type, cityId } = useUserCurrentLocationStore( - useShallow((state) => ({ - latitude: state.latitude, - longitude: state.longitude, - type: state.type, - cityId: state.cityId, - })), - ) +export const ConcertList = forwardRef( + ({ onPressItem, onPressSubscribe, eventCategory }, ref) => { + const [isRefreshing, setIsRefreshing] = useState(false) + const { latitude, longitude, type, cityId } = useUserCurrentLocationStore( + useShallow((state) => ({ + latitude: state.latitude, + longitude: state.longitude, + type: state.type, + cityId: state.cityId, + })), + ) - const queryParams = useMemo(() => { - return match(type) - .with('current-location', () => ({ - latitude, - longitude, - })) - .with('city-location', () => ({ - locationCityId: cityId, - })) - .otherwise(() => ({})) - }, [type, latitude, longitude, cityId]) - - const { data, isPending, fetchNextPage, isFetchingNextPage, hasNextPage, refetch } = useSuspenseInfiniteQuery({ - initialPageParam: 0, - queryKey: apiClient.event.queryKeys.list(queryParams), - queryFn: ({ pageParam = 0 }) => - apiClient.event.getList({ - offset: pageParam, - size: PER_PAGE, - ...queryParams, - }), - getNextPageParam: (lastPage, allPages) => { - if (lastPage.length < PER_PAGE) { - return undefined + const queryParams = useMemo(() => { + const value: Parameters[0] = { + eventCategoryName: eventCategory, } - return allPages.length * PER_PAGE - }, - refetchOnWindowFocus: false, - }) - - const concertList = useMemo(() => { - return data.pages.flatMap((page) => page).map((data) => data.data) - }, [data?.pages]) - - const renderItem: ListRenderItem = useCallback( - ({ item, index }) => { - return ( - onPressItem?.(item)} - onPressSubscribe={({ isSubscribed }) => onPressSubscribe?.(item, { isSubscribed })} - style={{ - paddingLeft: index % 2 === 0 ? 0 : 6, - paddingRight: index % 2 === 0 ? 6 : 0, - }} - /> - ) - }, - [onPressItem, onPressSubscribe], - ) + return match(type) + .with('current-location', () => { + if (latitude === null || longitude === null) { + return value + } + value.latitude = latitude + value.longitude = longitude + return value + }) + .with('city-location', () => { + if (cityId === null) { + return value + } + value.locationCityId = cityId + return value + }) + .otherwise(() => value) + }, [eventCategory, type, latitude, longitude, cityId]) - const onEndReached = useCallback(async () => { - if (isPending || isFetchingNextPage) { - return - } - if (!hasNextPage) { - return - } - await fetchNextPage() - }, [fetchNextPage, hasNextPage, isFetchingNextPage, isPending]) + const { data, isPending, fetchNextPage, isFetchingNextPage, hasNextPage, refetch } = useSuspenseInfiniteQuery({ + initialPageParam: 0, + queryKey: apiClient.event.queryKeys.list(queryParams), + queryFn: ({ pageParam = 0 }) => + apiClient.event.getList({ + offset: pageParam, + size: PER_PAGE, + ...queryParams, + }), + getNextPageParam: (lastPage, allPages) => { + if (lastPage.length < PER_PAGE) { + return undefined + } + return allPages.length * PER_PAGE + }, + refetchOnWindowFocus: false, + }) - const onRefresh = useCallback(async () => { - setIsRefreshing(true) - await refetch() - setIsRefreshing(false) - }, [refetch]) + const concertList = useMemo(() => { + return data.pages.flatMap((page) => page).map((data) => data.data) + }, [data?.pages]) - return ( - item.id} - renderItem={renderItem} - // ItemSeparatorComponent={() => } - showsVerticalScrollIndicator={false} - contentContainerStyle={concertListStyles.concertListContentContainer} - ListEmptyComponent={ - isPending ? ( - - - - ) : ( - + const renderItem: ListRenderItem = useCallback( + ({ item, index }) => { + return ( + onPressItem?.(item)} + onPressSubscribe={({ isSubscribed }) => onPressSubscribe?.(item, { isSubscribed })} + style={{ + paddingLeft: index % 2 === 0 ? 0 : 6, + paddingRight: index % 2 === 0 ? 6 : 0, + }} + /> ) + }, + [onPressItem, onPressSubscribe], + ) + + const onEndReached = useCallback(async () => { + if (isPending || isFetchingNextPage) { + return } - ListFooterComponent={isFetchingNextPage ? : null} - refreshControl={ - + if (!hasNextPage) { + return } - scrollEnabled={!isRefreshing} - onEndReached={onEndReached} - /> - ) -}) + await fetchNextPage() + }, [fetchNextPage, hasNextPage, isFetchingNextPage, isPending]) + + const onRefresh = useCallback(async () => { + setIsRefreshing(true) + await refetch() + setIsRefreshing(false) + }, [refetch]) + + return ( + item.id} + renderItem={renderItem} + showsVerticalScrollIndicator={false} + contentContainerStyle={concertListStyles.concertListContentContainer} + ListEmptyComponent={ + isPending ? ( + + + + ) : ( + + ) + } + ListFooterComponent={isFetchingNextPage ? : null} + refreshControl={ + + } + scrollEnabled={!isRefreshing} + onEndReached={onEndReached} + /> + ) + }, +) From d47e6dcf060fb6a21adacad8c2dff0bfe000c68f Mon Sep 17 00:00:00 2001 From: yungblud Date: Tue, 18 Feb 2025 21:38:36 +0900 Subject: [PATCH 39/41] feat(billets-app): :art: implemented profiler --- .../event-category-screen.tsx | 21 +++++++++++++------ .../event-category-list.item.tsx | 9 +++++++- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx b/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx index a55be15c..b10a1e63 100644 --- a/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx +++ b/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx @@ -1,24 +1,33 @@ +import { zodScreen } from '@/lib/navigations' import { CommonScreenLayout, ConcertList } from '@/ui' import { Spinner } from '@coldsurfers/ocean-road/native' +import { PerformanceMeasureView, useStartProfiler } from '@shopify/react-native-performance' import { Suspense, useCallback } from 'react' import { useEventCategoryScreenNavigation, useEventCategoryScreenRoute } from './event-category-screen.hooks' export const EventCategoryScreen = () => { + const startNavigationTTITimer = useStartProfiler() const route = useEventCategoryScreenRoute() const navigation = useEventCategoryScreenNavigation() const onPressItem = useCallback( (eventId: string) => { + startNavigationTTITimer({ + source: zodScreen.EventCategoryScreen.name, + uiEvent: undefined, + }) navigation.navigate('EventDetailScreen', { eventId, }) }, - [navigation], + [navigation, startNavigationTTITimer], ) return ( - - }> - onPressItem(item.id)} /> - - + + + }> + onPressItem(item.id)} /> + + + ) } diff --git a/apps/billets-app/src/ui/event-category-list/event-category-list.item.tsx b/apps/billets-app/src/ui/event-category-list/event-category-list.item.tsx index dc94c808..305b5946 100644 --- a/apps/billets-app/src/ui/event-category-list/event-category-list.item.tsx +++ b/apps/billets-app/src/ui/event-category-list/event-category-list.item.tsx @@ -1,7 +1,9 @@ +import { zodScreen } from '@/lib/navigations' import { getEventCategoryUIName } from '@/lib/utils.event-category' import { useHomeScreenNavigation } from '@/screens' import { components } from '@/types/api' import { useColorScheme } from '@coldsurfers/ocean-road/native' +import { useStartProfiler } from '@shopify/react-native-performance' import { memo, useCallback } from 'react' import { DanceIcon, @@ -28,16 +30,21 @@ const getUiIcon = (name: string) => { } export const EventCategoryListItem = memo((props: components['schemas']['EventCategoryDTOSchema']) => { + const startNavigationTTITimer = useStartProfiler() const { semantics } = useColorScheme() const navigation = useHomeScreenNavigation() const onPress = useCallback(() => { + startNavigationTTITimer({ + source: zodScreen.HomeScreen.name, + uiEvent: undefined, + }) navigation.navigate('EventStackNavigation', { params: { eventCategory: props.name, }, screen: 'EventCategoryScreen', }) - }, [navigation, props.name]) + }, [navigation, props.name, startNavigationTTITimer]) return ( Date: Wed, 19 Feb 2025 21:06:02 +0900 Subject: [PATCH 40/41] feat(billets-app): :art: implemented ListHeader --- .../event-category-screen.tsx | 6 +++- .../src/screens/home-screen/home-screen.tsx | 32 ++----------------- .../ui/concert-list/concert-list.styles.ts | 1 - .../src/ui/concert-list/concert-list.tsx | 18 ++++------- 4 files changed, 14 insertions(+), 43 deletions(-) diff --git a/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx b/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx index b10a1e63..10687dfa 100644 --- a/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx +++ b/apps/billets-app/src/screens/event-category-screen/event-category-screen.tsx @@ -25,7 +25,11 @@ export const EventCategoryScreen = () => { }> - onPressItem(item.id)} /> + onPressItem(item.id)} + /> diff --git a/apps/billets-app/src/screens/home-screen/home-screen.tsx b/apps/billets-app/src/screens/home-screen/home-screen.tsx index 20b389a0..2b6788df 100644 --- a/apps/billets-app/src/screens/home-screen/home-screen.tsx +++ b/apps/billets-app/src/screens/home-screen/home-screen.tsx @@ -10,24 +10,14 @@ import { LocationSelectorModal, } from '@/ui' import { ConcertListItemType } from '@/ui/concert-list/concert-list.types' -import { EventCategoryList } from '@/ui/event-category-list' import { useScrollToTop } from '@react-navigation/native' import { PerformanceMeasureView, RenderStateProps, useStartProfiler } from '@shopify/react-native-performance' import { useQuery } from '@tanstack/react-query' import { Suspense, useCallback, useRef, useState } from 'react' -import { FlatList, ListRenderItem, SectionList, StyleSheet, View } from 'react-native' +import { FlatList, StyleSheet, View } from 'react-native' import { useShallow } from 'zustand/shallow' import { useHomeScreenNavigation } from './home-screen.hooks' -const sections = [ - { - data: ['menu'], - }, - { - data: ['list'], - }, -] as const - const SuspenseHomeScreen = () => { const startNavigationTTITimer = useStartProfiler() const navigation = useHomeScreenNavigation() @@ -107,19 +97,6 @@ const SuspenseHomeScreen = () => { setLocationModalVisible(true) }, []) - const renderItem: ListRenderItem<(typeof sections)[number]['data'][number]> = useCallback( - (info) => { - if (info.item === 'menu') { - return - } - if (info.item === 'list') { - return - } - return null - }, - [onPressConcertListItem, onPressSubscribe], - ) - return ( {latitude === null && longitude === null && } @@ -127,12 +104,7 @@ const SuspenseHomeScreen = () => { {latitude !== null && longitude !== null && ( }> - + )} diff --git a/apps/billets-app/src/ui/concert-list/concert-list.styles.ts b/apps/billets-app/src/ui/concert-list/concert-list.styles.ts index c3af4646..038b00c3 100644 --- a/apps/billets-app/src/ui/concert-list/concert-list.styles.ts +++ b/apps/billets-app/src/ui/concert-list/concert-list.styles.ts @@ -3,7 +3,6 @@ import { StyleSheet } from 'react-native' export const concertListStyles = StyleSheet.create({ concertListContentContainer: { paddingHorizontal: 12, - marginTop: 12, paddingBottom: 64, flexGrow: 1, }, diff --git a/apps/billets-app/src/ui/concert-list/concert-list.tsx b/apps/billets-app/src/ui/concert-list/concert-list.tsx index 71409235..8ce0d8b3 100644 --- a/apps/billets-app/src/ui/concert-list/concert-list.tsx +++ b/apps/billets-app/src/ui/concert-list/concert-list.tsx @@ -1,14 +1,14 @@ import { useUserCurrentLocationStore } from '@/features' import { apiClient } from '@/lib/api/openapi-client' -import { colors } from '@coldsurfers/ocean-road' import { Spinner } from '@coldsurfers/ocean-road/native' import { useSuspenseInfiniteQuery } from '@tanstack/react-query' import { forwardRef, useCallback, useMemo, useState } from 'react' -import { FlatList, ListRenderItem, Platform, RefreshControl, View } from 'react-native' +import { FlatList, ListRenderItem, View } from 'react-native' import { match } from 'ts-pattern' import { useShallow } from 'zustand/shallow' import { CommonListEmpty } from '../common-list-empty' import { ConcertListItem } from '../concert-list-item' +import { EventCategoryList } from '../event-category-list' import { concertListStyles } from './concert-list.styles' import { ConcertListItemType } from './concert-list.types' @@ -16,12 +16,13 @@ type ConcertListProps = { onPressItem?: (item: ConcertListItemType) => void onPressSubscribe?: (item: ConcertListItemType, options: { isSubscribed: boolean }) => void eventCategory?: string + hideTopMenu?: boolean } const PER_PAGE = 20 export const ConcertList = forwardRef( - ({ onPressItem, onPressSubscribe, eventCategory }, ref) => { + ({ onPressItem, onPressSubscribe, eventCategory, hideTopMenu }, ref) => { const [isRefreshing, setIsRefreshing] = useState(false) const { latitude, longitude, type, cityId } = useUserCurrentLocationStore( useShallow((state) => ({ @@ -129,15 +130,10 @@ export const ConcertList = forwardRef( ) } + ListHeaderComponent={hideTopMenu ? null : } + refreshing={isRefreshing} + onRefresh={onRefresh} ListFooterComponent={isFetchingNextPage ? : null} - refreshControl={ - - } scrollEnabled={!isRefreshing} onEndReached={onEndReached} /> From bc7ca9dad780952da29b94eca954bd75d3e30ab5 Mon Sep 17 00:00:00 2001 From: yungblud Date: Wed, 19 Feb 2025 21:46:42 +0900 Subject: [PATCH 41/41] fix: :art: fixed styles --- .../src/screens/email-login-screen/email-login-screen.tsx | 6 +++--- apps/billets-app/src/ui/ticket-item/ticket-item.tsx | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/billets-app/src/screens/email-login-screen/email-login-screen.tsx b/apps/billets-app/src/screens/email-login-screen/email-login-screen.tsx index 456a5c03..3d85f194 100644 --- a/apps/billets-app/src/screens/email-login-screen/email-login-screen.tsx +++ b/apps/billets-app/src/screens/email-login-screen/email-login-screen.tsx @@ -1,13 +1,13 @@ import { AuthContext, ToastVisibleContext, ToastVisibleContextProvider } from '@/lib' import { $api } from '@/lib/api/openapi-client' -import { CommonScreenLayout, NAVIGATION_HEADER_HEIGHT } from '@/ui' -import { Button, Spinner, TextInput, useColorScheme } from '@coldsurfers/ocean-road/native' +import { CommonScreenLayout } from '@/ui' +import { NAVIGATION_HEADER_HEIGHT } from '@/ui/navigation-header/navigation-header.constants' +import { Button, Spinner, TextInput } from '@coldsurfers/ocean-road/native' import React, { useCallback, useContext, useEffect, useState } from 'react' import { KeyboardAvoidingView, StyleSheet, View } from 'react-native' import { useEmailLoginScreenNavigation } from './email-login-screen.hooks' const _EmailLoginScreen = () => { - const { semantics } = useColorScheme() const { show } = useContext(ToastVisibleContext) const { login } = useContext(AuthContext) const { navigate } = useEmailLoginScreenNavigation() diff --git a/apps/billets-app/src/ui/ticket-item/ticket-item.tsx b/apps/billets-app/src/ui/ticket-item/ticket-item.tsx index 2a18a0b7..8de18dd6 100644 --- a/apps/billets-app/src/ui/ticket-item/ticket-item.tsx +++ b/apps/billets-app/src/ui/ticket-item/ticket-item.tsx @@ -1,6 +1,7 @@ import { useInterstitialAd } from '@/features/google-ads/google-ads.hooks' import { concertTicketBtnPressCountForInterstitialAdStorage } from '@/lib/storage/concert-ticket-btn-press-count-for-interstitial-ad-storage' import { components } from '@/types/api' +import { colors } from '@coldsurfers/ocean-road' import { Button, Text, useColorScheme } from '@coldsurfers/ocean-road/native' import { SquareArrowOutUpRight } from 'lucide-react-native' import { memo, useCallback } from 'react' @@ -36,11 +37,11 @@ export const TicketItem = memo(({ sellerName, url }: TicketItemProps) => { {sellerName}