From 25c34c8a6fccbc4c9e07ff673e004bf62fac28b7 Mon Sep 17 00:00:00 2001 From: alisaza Date: Mon, 7 Sep 2026 20:09:22 +0330 Subject: [PATCH] chore: remove unused constants and service utility - Deleted `discovery.ts` for unused constants related to discovery page limits and sorting. - Removed `unwrapService.ts`, a utility function for handling service results, as it is no longer needed. --- constants/discovery.ts | 10 ---------- queries/unwrapService.ts | 11 ----------- 2 files changed, 21 deletions(-) delete mode 100644 constants/discovery.ts delete mode 100644 queries/unwrapService.ts diff --git a/constants/discovery.ts b/constants/discovery.ts deleted file mode 100644 index 2881d57..0000000 --- a/constants/discovery.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const DISCOVERY_PAGE_SIZE = 12 - -/** Home hero strip: most-booked events. */ -export const HOME_POPULAR_LIMIT = 3 - -/** Home category preview list under EventTitleRoller. */ -export const HOME_CATEGORY_PREVIEW_LIMIT = 6 - -export const HOME_POPULAR_SORT = '-bookedCount' -export const HOME_CATEGORY_SORT = '-createdAt' diff --git a/queries/unwrapService.ts b/queries/unwrapService.ts deleted file mode 100644 index 060c3fa..0000000 --- a/queries/unwrapService.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { ServiceResult } from '@/services/errorHandler' - -/** - * Turns a ServiceResult into a thrown error for TanStack Query, - * or returns the success payload. - */ -export const unwrapService = (result: ServiceResult): T => { - if (result.ok) return result.data - - throw result.error -}