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.
This commit is contained in:
alisaza 2026-09-07 20:09:22 +03:30
parent 9f0a3bfc86
commit 25c34c8a6f
2 changed files with 0 additions and 21 deletions

View File

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

View File

@ -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 = <T>(result: ServiceResult<T>): T => {
if (result.ok) return result.data
throw result.error
}