diff --git a/convex/constants.ts b/convex/constants.ts index 373e263..c8cd4ae 100644 --- a/convex/constants.ts +++ b/convex/constants.ts @@ -335,13 +335,11 @@ export type Cost = { description: string; }; -export const FREE = "free"; - /** * Estimated time units. * Used to display estimated time in quest details. */ -export const ESTIMATED_TIME_UNITS = { +export const TIME_UNITS = { minutes: "Minutes", hours: "Hours", days: "Days", @@ -349,7 +347,7 @@ export const ESTIMATED_TIME_UNITS = { months: "Months", } as const; -export type TimeRequiredUnit = keyof typeof ESTIMATED_TIME_UNITS; +export type TimeRequiredUnit = keyof typeof TIME_UNITS; export type TimeRequired = { min: number; diff --git a/convex/validators.ts b/convex/validators.ts index 9e3646b..353e70c 100644 --- a/convex/validators.ts +++ b/convex/validators.ts @@ -1,13 +1,13 @@ import { v } from "convex/values"; import { CATEGORIES, - ESTIMATED_TIME_UNITS, FIELDS, GROUP_QUESTS_BY, JURISDICTIONS, ROLES, STATUS, THEMES, + TIME_UNITS, } from "./constants"; export const jurisdiction = v.union( @@ -41,5 +41,5 @@ export const category = v.union( ); export const timeRequiredUnit = v.union( - ...Object.keys(ESTIMATED_TIME_UNITS).map((unit) => v.literal(unit)), + ...Object.keys(TIME_UNITS).map((unit) => v.literal(unit)), ); diff --git a/src/routes/_authenticated/admin/quests/$questId.tsx b/src/routes/_authenticated/admin/quests/$questId.tsx index d559f41..6cd2278 100644 --- a/src/routes/_authenticated/admin/quests/$questId.tsx +++ b/src/routes/_authenticated/admin/quests/$questId.tsx @@ -16,9 +16,9 @@ import { type Category, type Cost, DEFAULT_TIME_REQUIRED, - ESTIMATED_TIME_UNITS, JURISDICTIONS, type Jurisdiction, + TIME_UNITS, type TimeRequired, type TimeRequiredUnit, } from "@convex/constants"; @@ -191,7 +191,7 @@ const TimeRequiredInput = memo(function TimeRequiredInput({ }) } > - {Object.entries(ESTIMATED_TIME_UNITS).map(([key, label]) => ( + {Object.entries(TIME_UNITS).map(([key, label]) => ( {label}