mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 09:25:27 +00:00
feat(modals): port SignedOut and SignOutSessions
This commit is contained in:
@@ -10,6 +10,7 @@ import { Preloader } from "@revoltchat/ui";
|
||||
import { useApplicationState } from "../../mobx/State";
|
||||
|
||||
import { useIntermediate } from "../intermediate/Intermediate";
|
||||
import { modalController } from "../modals";
|
||||
import { registerEvents } from "./events";
|
||||
import { takeError } from "./util";
|
||||
|
||||
@@ -68,7 +69,7 @@ export default observer(({ children }: Props) => {
|
||||
const error = takeError(err);
|
||||
if (error === "Forbidden" || error === "Unauthorized") {
|
||||
client.logout(true);
|
||||
openScreen({ id: "signed_out" });
|
||||
modalController.push({ type: "signed_out" });
|
||||
} else {
|
||||
setStatus(ClientStatus.DISCONNECTED);
|
||||
openScreen({ id: "error", error });
|
||||
|
||||
Reference in New Issue
Block a user