Remove preview

This commit is contained in:
Liam 2022-10-30 14:54:22 +00:00
parent 4af129ea20
commit 99c9f4053d

@ -5,7 +5,6 @@ import {
Grid, Grid,
Input, Input,
Link, Link,
Modal,
Radio, Radio,
Spacer, Spacer,
Spinner, Spinner,
@ -30,8 +29,6 @@ export default class Home extends Component {
this.state = { this.state = {
loading: true, loading: true,
steamId: undefined, steamId: undefined,
isPreviewVisible: false,
previewUrl: undefined,
overlayUrl: undefined, overlayUrl: undefined,
avatarUrl: undefined, avatarUrl: undefined,
@ -87,13 +84,6 @@ export default class Home extends Component {
this.setState({ loading: false }); this.setState({ loading: false });
} }
loadPreview() {
this.setState({
isPreviewVisible: true,
previewUrl: this.generateUrl(),
});
}
generateUrl() { generateUrl() {
let values = ""; let values = "";
Object.entries(this.state.values).forEach((value) => { Object.entries(this.state.values).forEach((value) => {
@ -161,26 +151,6 @@ export default class Home extends Component {
marginTop: "$8", marginTop: "$8",
}} }}
> >
{/* Preview */}
{this.state.isPreviewVisible ? (
<Modal
closeButton
open={this.state.isPreviewVisible}
width={"100%"}
blur
onClose={() => this.setState({ isPreviewVisible: false })}
>
<Modal.Header>
<Text size={18}>Overlay Preview</Text>
</Modal.Header>
<Modal.Body>
<iframe height={600} src={this.state.previewUrl}></iframe>
</Modal.Body>
</Modal>
) : (
<></>
)}
<Grid.Container gap={2} justify="center"> <Grid.Container gap={2} justify="center">
<Grid <Grid
xs={12} xs={12}
@ -326,19 +296,6 @@ export default class Home extends Component {
> >
Open Overlay Open Overlay
</Button> </Button>
<Button
flat
auto
onPress={() => {
if (!this.state.steamId) {
toast.error("Please provide a Steam ID");
return;
}
this.loadPreview();
}}
>
Preview
</Button>
</Button.Group> </Button.Group>
<Text <Text