You've already forked AstralRinth
forked from didirus/AstralRinth
Refactor search page, migrate to /discover/ (#4862)
This commit is contained in:
@@ -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]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user