chore: pick random relays for new users

This commit is contained in:
2023-02-02 18:22:57 +00:00
parent 1770e09159
commit ea7209c12f
2 changed files with 20 additions and 2 deletions

View File

@ -340,10 +340,12 @@ const LoginSlice = createSlice({
state.dmInteraction += 1;
},
logout: (state) => {
let relays = { ...state.relays };
Object.assign(state, InitState);
state.loggedOut = true;
state.relays = Object.fromEntries(DefaultRelays.entries());
window.localStorage.clear();
state.relays = relays;
window.localStorage.setItem(RelayListKey, JSON.stringify(relays));
},
markNotificationsRead: (state) => {
state.readNotifications = new Date().getTime();