Refactor search page, migrate to /discover/ (#4862)

This commit is contained in:
Prospector
2025-12-09 14:25:45 -08:00
committed by GitHub
parent 251e89fe5a
commit 1d64b2e22a
22 changed files with 1252 additions and 973 deletions

View File

@@ -0,0 +1,13 @@
import type { LocationQueryValue, RouteRecordNameGeneric } from 'vue-router'
export function queryAsStringOrEmpty(query: LocationQueryValue | LocationQueryValue[]): string {
return Array.isArray(query) ? (query[0] ?? '') : (query ?? '')
}
export function queryAsString(query: LocationQueryValue | LocationQueryValue[]): string | null {
return Array.isArray(query) ? (query[0] ?? null) : (query ?? null)
}
export function routeNameAsString(name: RouteRecordNameGeneric | undefined): string | undefined {
return name && typeof name === 'string' ? (name as string) : undefined
}