mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-30 02:39:05 +08:00
parent
4e55bce14b
commit
dce3f852ea
2 changed files with 6 additions and 7 deletions
|
|
@ -3,7 +3,6 @@ import * as Notifications from "./elements/notifications";
|
|||
import axiosInstance from "./axios-instance";
|
||||
import * as TodayTracker from "./test/today-tracker";
|
||||
import * as LoadingPage from "./pages/loading";
|
||||
import * as UI from "./ui";
|
||||
|
||||
let dbSnapshot = null;
|
||||
|
||||
|
|
@ -58,12 +57,6 @@ export async function initSnapshot() {
|
|||
// LoadingPage.updateBar(16);
|
||||
// }
|
||||
// LoadingPage.updateText("Downloading user...");
|
||||
if (UI.getActivePage() == "pageLoading") {
|
||||
LoadingPage.updateBar(90);
|
||||
} else {
|
||||
LoadingPage.updateBar(45);
|
||||
}
|
||||
LoadingPage.updateText("Downloading user data...");
|
||||
let promises = await Promise.all([
|
||||
axiosInstance.get("/user"),
|
||||
axiosInstance.get("/config"),
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ export function toggleFilterDebug() {
|
|||
export async function getDataAndInit() {
|
||||
try {
|
||||
console.log("getting account data");
|
||||
if (UI.getActivePage() == "pageLoading") {
|
||||
LoadingPage.updateBar(90);
|
||||
} else {
|
||||
LoadingPage.updateBar(45);
|
||||
}
|
||||
LoadingPage.updateText("Downloading user data...");
|
||||
await LoadingPage.showBar();
|
||||
await DB.initSnapshot();
|
||||
} catch (e) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue