mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-13 15:36:42 +08:00
reordered functions to fix lint warnings
This commit is contained in:
parent
119bb271f7
commit
68aa71312b
1 changed files with 14 additions and 14 deletions
|
@ -1,6 +1,20 @@
|
|||
import axiosInstance from "./axios-instance";
|
||||
import * as Notifications from "./notifications";
|
||||
|
||||
function clearMemory() {
|
||||
window.localStorage.setItem("confirmedPSAs", JSON.stringify([]));
|
||||
}
|
||||
|
||||
function getMemory() {
|
||||
return JSON.parse(window.localStorage.getItem("confirmedPSAs")) ?? [];
|
||||
}
|
||||
|
||||
function setMemory(id) {
|
||||
let list = getMemory();
|
||||
list.push(id);
|
||||
window.localStorage.setItem("confirmedPSAs", JSON.stringify(list));
|
||||
}
|
||||
|
||||
async function getLatest() {
|
||||
let psa = await axiosInstance.get("/psa");
|
||||
return psa.data;
|
||||
|
@ -20,17 +34,3 @@ export async function show() {
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
function setMemory(id) {
|
||||
let list = getMemory();
|
||||
list.push(id);
|
||||
window.localStorage.setItem("confirmedPSAs", JSON.stringify(list));
|
||||
}
|
||||
|
||||
function clearMemory() {
|
||||
window.localStorage.setItem("confirmedPSAs", JSON.stringify([]));
|
||||
}
|
||||
|
||||
function getMemory() {
|
||||
return JSON.parse(window.localStorage.getItem("confirmedPSAs")) ?? [];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue