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 {
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user