fix version display

This commit is contained in:
SpikeHD
2022-05-14 14:46:18 -07:00
parent 2253ed6f35
commit c1878119d0

View File

@@ -19,13 +19,19 @@ interface IProps {
interface IState { interface IState {
version: string; version: string;
} }
export default class TopBar extends React.Component<IProps, IState> { export default class TopBar extends React.Component<IProps, IState> {
constructor(props: IProps) { constructor(props: IProps) {
super(props) super(props)
app.getVersion().then(version => { this.state = { version: '0.0.0' }
this.state = { version }
})
}
async componentDidMount() {
const version = await app.getVersion()
this.setState({ version })
} }
handleClose() { handleClose() {