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

@@ -287,7 +287,7 @@ export const formatVersions = (versionArray, gameVersions) => {
return (output.length === 0 ? versionArray : output).join(', ')
}
export function cycleValue(value, values) {
export function cycleValue<T extends string>(value: T, values: T[]): T {
const index = values.indexOf(value) + 1
return values[index % values.length]
}