import { Button, Card, Container, Grid, Input, Spacer, Switch, Text } from '@nextui-org/react'; import { Component } from 'react'; import NavBar from '../src/components/Navbar'; import styles from '../styles/main.module.css'; export default class Home extends Component { constructor(props) { super(props); this.state = { socketAddr: undefined, steamId: undefined, socketAddr: undefined, } } async componentDidMount() { const urlSearchParams = new URLSearchParams(window.location.search); const params = Object.fromEntries(urlSearchParams.entries()); if (params.id) { document.location.href = "/overlay/"+ window.location.search return; } this.loadPreview(); } loadPreview() { const previewiframe = document.getElementById('previewiframe'); const id = this.state.steamId || "test"; previewiframe.src = window.location.origin + "/overlay/?id=" + id + "&bg=000"; } generateUrl() { } render() { return