fixed data
This commit is contained in:
1 parent
eaa5cc0065
commit
54f4e991a3
5 files changed
+47
-29
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { PREF } from "./const";
|
||||
|
||||
export function setPlayerAnswers(answers: string[]) {
|
||||
localStorage.setItem(PREF.worthyWords, JSON.stringify(answers));
|
||||
window.dispatchEvent(new Event('storage'));
|
||||
}
|
||||
|
||||
export function getAnswers(): Player[] {
|
||||
const answers = localStorage.getItem(PREF.worthyWords);
|
||||
if (answers === null) {
|
||||
return [];
|
||||
}
|
||||
return JSON.parse(answers);
|
||||
}
|
||||
Reference in new issue
Block a user