fix: add missing rating name overrides (#1291)

This commit is contained in:
nairobi
2025-05-04 14:40:09 +01:00
committed by GitHub
parent ac7e47bb31
commit 67ef99a27b
2 changed files with 19 additions and 5 deletions
@@ -130,7 +130,9 @@ function AlgSelector({
<div>Best 100 PBs according to</div>
<Form.Select value={alg} onChange={(e) => setAlg(e.target.value as any)}>
{Object.keys(gptConfig.scoreRatingAlgs).map((e) => (
<option key={e}>{FormatGPTScoreRatingName(game, playtype, e)}</option>
<option key={e} value={e}>
{FormatGPTScoreRatingName(game, playtype, e)}
</option>
))}
</Form.Select>
</Form.Group>
@@ -1,5 +1,11 @@
import { APIFetchV1 } from "util/api";
import { ToFixedFloor, UppercaseFirst } from "util/misc";
import {
FormatGPTProfileRatingName,
FormatGPTScoreRatingName,
FormatGPTSessionRatingName,
ToFixedFloor,
UppercaseFirst,
} from "util/misc";
import { ErrorPage } from "app/pages/ErrorPage";
import useSetSubheader from "components/layout/header/useSetSubheader";
import Card from "components/layout/page/Card";
@@ -178,7 +184,9 @@ function PreferencesForm({ reqUser, game, playtype }: UGPT) {
onChange={formik.handleChange}
>
{Object.keys(gptConfig.scoreRatingAlgs).map((e) => (
<option key={e}>{e}</option>
<option key={e} value={e}>
{FormatGPTScoreRatingName(game, playtype, e)}
</option>
))}
</Form.Select>
<Form.Text className="text-body-secondary">
@@ -196,7 +204,9 @@ function PreferencesForm({ reqUser, game, playtype }: UGPT) {
onChange={formik.handleChange}
>
{Object.keys(gptConfig.sessionRatingAlgs).map((e) => (
<option key={e}>{e}</option>
<option key={e} value={e}>
{FormatGPTSessionRatingName(game, playtype, e)}
</option>
))}
</Form.Select>
<Form.Text className="text-body-secondary">
@@ -214,7 +224,9 @@ function PreferencesForm({ reqUser, game, playtype }: UGPT) {
onChange={formik.handleChange}
>
{Object.keys(gptConfig.profileRatingAlgs).map((e) => (
<option key={e}>{e}</option>
<option key={e} value={e}>
{FormatGPTProfileRatingName(game, playtype, e)}
</option>
))}
</Form.Select>
<Form.Text className="text-body-secondary">