mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-09 18:15:28 +00:00
feat(mobx): add sync back (do not look at the code)
This commit is contained in:
@@ -30,6 +30,20 @@ export default class Auth implements Store, Persistent<Data> {
|
||||
constructor() {
|
||||
this.sessions = new ObservableMap();
|
||||
this.current = null;
|
||||
|
||||
// Inject session token if it is provided.
|
||||
if (import.meta.env.VITE_SESSION_TOKEN) {
|
||||
this.sessions.set("0", {
|
||||
session: {
|
||||
name: "0",
|
||||
user_id: "0",
|
||||
token: import.meta.env.VITE_SESSION_TOKEN as string,
|
||||
},
|
||||
});
|
||||
|
||||
this.current = "0";
|
||||
}
|
||||
|
||||
makeAutoObservable(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user