feat: use Button component for dev page, linting

This commit is contained in:
Ed L 2022-09-10 20:25:07 +01:00 committed by Paul Makles
parent 734fa06425
commit bfeefb4c73
2 changed files with 12 additions and 3 deletions

View file

@ -126,7 +126,7 @@ export default function App() {
)}
{alert.dismissable !== false && (
<a onClick={() => setStatusBar(false)}>
<div className="button">Dismiss</div>
<div className="button">{"Dismiss"}</div>
</a>
)}
</div>

View file

@ -2,6 +2,8 @@ import { Wrench } from "@styled-icons/boxicons-solid";
import { useEffect, useState } from "preact/hooks";
import { Button } from "@revoltchat/ui";
import PaintCounter from "../../lib/PaintCounter";
import { TextReact } from "../../lib/i18n";
@ -45,8 +47,15 @@ export default function Developer() {
</div>
<div style={{ padding: "16px" }}>
<a style={"cursor: pointer;"} onClick={() => setCrash(true)}>click to crash app</a>
{crash && (window as any).sus.sus()}
<Button palette="error" onClick={() => setCrash(true)}>
Click to crash app
</Button>
{
crash &&
(
window as any
).sus.sus() /* this runs a function that doesn't exist */
}
{/*<span>
<b>Voice Status:</b> {VoiceStatus[voice.status]}
</span>