mirror of
https://github.com/bendtherules/is-nifty-open.git
synced 2026-08-18 13:52:20 +00:00
Fix dateswitchbar using setState before mount problem
This commit is contained in:
@@ -6,7 +6,6 @@ export class DateSwitchBar extends React.Component<{}, { rotated: boolean }> {
|
||||
|
||||
constructor(props: {}) {
|
||||
super(props);
|
||||
this.state = { rotated: false };
|
||||
|
||||
this.willBeCreated(props);
|
||||
}
|
||||
@@ -16,7 +15,7 @@ export class DateSwitchBar extends React.Component<{}, { rotated: boolean }> {
|
||||
}
|
||||
|
||||
willBeCreated(props: {}) {
|
||||
this.setState({ rotated: false });
|
||||
this.state = { rotated: false };
|
||||
}
|
||||
|
||||
afterUpdated() {
|
||||
|
||||
Reference in New Issue
Block a user