mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 16:14:48 +01:00
fix version display
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user