aboutsummaryrefslogtreecommitdiff
path: root/webAO/dom/reconnectButton.ts
blob: 4031ccd6de9d8923b23cd2310de8999b31aa845c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import Client, { client, setClient } from "../client";
import queryParser from "../utils/queryParser";
let { ip: serverIP } = queryParser();

/**
 * Triggered when the reconnect button is pushed.
 */
export function ReconnectButton() {
    client.cleanup();
    setClient(new Client(serverIP));

    if (client) {
        document.getElementById("client_error")!.style.display = "none";
    }
}
window.ReconnectButton = ReconnectButton;