diff --git a/src/ui/LiveSplit.tsx b/src/ui/LiveSplit.tsx index 1ef7ee6..3c20011 100644 --- a/src/ui/LiveSplit.tsx +++ b/src/ui/LiveSplit.tsx @@ -99,24 +99,24 @@ export class LiveSplit extends React.Component<{}, State> { } public render() { - const { route, content } = ((): { route: Route, content: JSX.Element } => { + const [route, content] = ((): [Route, JSX.Element] => { if (this.state.runEditor) { - return { - route: "run-editor", - content: , - }; + return [ + "run-editor", + , + ]; } else if (this.state.layoutEditor) { - return { - route: "layout-editor", - content: , - }; + ]; } else { - return { - route: "main", - content:
{
, - }; + ]; } })(); @@ -228,12 +228,12 @@ export class LiveSplit extends React.Component<{}, State> { } public exportSplits() { - const { lss, name } = this.state.timer.readWith((t) => { + const [lss, name] = this.state.timer.readWith((t) => { const run = t.getRun(); - return { - lss: run.saveAsLss(), - name: run.extendedFileName(true), - }; + return [ + run.saveAsLss(), + run.extendedFileName(true), + ]; }); exportFile(name + ".lss", lss); } diff --git a/src/ui/SideBarContent.tsx b/src/ui/SideBarContent.tsx index 5795a30..7284256 100644 --- a/src/ui/SideBarContent.tsx +++ b/src/ui/SideBarContent.tsx @@ -179,11 +179,11 @@ export class SideBarContent extends React.Component { private update() { if (this.props.route === "main" && this.props.sidebarOpen) { - const { comparison, timingMethod } = this.props.timer.readWith((t) => { - return { - comparison: t.currentComparison(), - timingMethod: t.currentTimingMethod(), - }; + const [comparison, timingMethod] = this.props.timer.readWith((t): [string, number] => { + return [ + t.currentComparison(), + t.currentTimingMethod(), + ]; }); if (comparison !== this.state.comparison || timingMethod !== this.state.timingMethod) {