import { useDispatch } from 'tgui/backend';
import { Button } from 'tgui/components';
import { dismissWarning } from './game/actions';
let url: string | null = null;
setInterval(() => {
Byond.winget('', 'url').then((currentUrl) => {
// Sometimes, for whatever reason, BYOND will give an IP with a :0 port.
if (currentUrl && !currentUrl.match(/:0$/)) {
url = currentUrl;
}
});
}, 5000);
export const ReconnectButton = (props) => {
if (!url) {
return null;
}
const dispatch = useDispatch();
return (
<>
>
);
};