mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-07 22:23:45 +08:00
rename
This commit is contained in:
parent
1fef875ad4
commit
7e8a1b7852
3 changed files with 5 additions and 5 deletions
|
@ -5,12 +5,12 @@ import { promiseWithResolvers } from "../utils/misc";
|
|||
let config: Configuration | undefined = undefined;
|
||||
|
||||
const {
|
||||
promise: configPromise,
|
||||
promise: configurationPromise,
|
||||
resolve,
|
||||
reject,
|
||||
} = promiseWithResolvers<boolean>();
|
||||
|
||||
export { configPromise };
|
||||
export { configurationPromise };
|
||||
|
||||
export function get(): Configuration | undefined {
|
||||
return config;
|
||||
|
|
|
@ -32,7 +32,7 @@ import { getFirstDayOfTheWeek } from "./utils/date-and-time";
|
|||
import { Language } from "@monkeytype/schemas/languages";
|
||||
import * as AuthEvent from "./observables/auth-event";
|
||||
import {
|
||||
configPromise,
|
||||
configurationPromise,
|
||||
get as getServerConfiguration,
|
||||
} from "./ape/server-configuration";
|
||||
|
||||
|
@ -86,7 +86,7 @@ export function setSnapshot(
|
|||
export async function initSnapshot(): Promise<Snapshot | false> {
|
||||
//send api request with token that returns tags, presets, and data needed for snap
|
||||
const snap = getDefaultSnapshot();
|
||||
await configPromise;
|
||||
await configurationPromise;
|
||||
|
||||
try {
|
||||
if (!isAuthenticated()) return false;
|
||||
|
|
|
@ -1417,7 +1417,7 @@ export const page = new PageWithUrlParams({
|
|||
stopTimer();
|
||||
},
|
||||
beforeShow: async (options): Promise<void> => {
|
||||
await ServerConfiguration.configPromise;
|
||||
await ServerConfiguration.configurationPromise;
|
||||
Skeleton.append("pageLeaderboards", "main");
|
||||
await updateValidDailyLeaderboards();
|
||||
await appendModeAndLanguageButtons();
|
||||
|
|
Loading…
Add table
Reference in a new issue