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 {
version: string;
}
export default class TopBar extends React.Component<IProps, IState> {
constructor(props: IProps) {
super(props)
app.getVersion().then(version => {
this.state = { version }
})
this.state = { version: '0.0.0' }
}
async componentDidMount() {
const version = await app.getVersion()
this.setState({ version })
}
handleClose() {