2024-03-25 13:10:43 -07:00
|
|
|
export function getData() {
|
2023-11-11 21:31:40 -08:00
|
|
|
const dataStr = localStorage.getItem('data');
|
|
|
|
if (!dataStr)
|
|
|
|
return null;
|
2023-11-12 20:47:04 -08:00
|
|
|
return JSON.parse(atob(dataStr), (k, v) => k.endsWith('Attr') ? BigInt(v) : v);
|
2023-11-11 21:31:40 -08:00
|
|
|
}
|
|
|
|
|
2024-03-25 13:10:43 -07:00
|
|
|
export function getSession() {
|
2023-10-18 15:01:15 -07:00
|
|
|
const sessionStr = localStorage.getItem('sessionData');
|
|
|
|
if (!sessionStr)
|
|
|
|
return null;
|
|
|
|
return JSON.parse(atob(sessionStr));
|
|
|
|
}
|