mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-27 07:20:23 +05:30
Fix another TSC error
This commit is contained in:
parent
f2036012d3
commit
8851c8a665
@ -139,7 +139,7 @@ class PanelTransition extends React.PureComponent<Props, State> {
|
|||||||
onFormSubmit: () => void;
|
onFormSubmit: () => void;
|
||||||
} | null = null;
|
} | null = null;
|
||||||
|
|
||||||
timerIds: Array<ReturnType<typeof setTimeout>> = []; // this is a list of a probably running timeouts to clean on unmount
|
timerIds: Array<number> = []; // this is a list of a probably running timeouts to clean on unmount
|
||||||
|
|
||||||
componentDidUpdate(prevProps: Props) {
|
componentDidUpdate(prevProps: Props) {
|
||||||
const nextPanel: PanelId = this.props.Body && (this.props.Body.type as any).panelId;
|
const nextPanel: PanelId = this.props.Body && (this.props.Body.type as any).panelId;
|
||||||
@ -160,7 +160,7 @@ class PanelTransition extends React.PureComponent<Props, State> {
|
|||||||
|
|
||||||
if (forceHeight) {
|
if (forceHeight) {
|
||||||
this.timerIds.push(
|
this.timerIds.push(
|
||||||
setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
this.setState({ forceHeight: 0 });
|
this.setState({ forceHeight: 0 });
|
||||||
}, 100),
|
}, 100),
|
||||||
);
|
);
|
||||||
@ -537,7 +537,7 @@ class PanelTransition extends React.PureComponent<Props, State> {
|
|||||||
this.setState({ isHeightDirty: false });
|
this.setState({ isHeightDirty: false });
|
||||||
|
|
||||||
// wait till transition end
|
// wait till transition end
|
||||||
this.timerIds.push(setTimeout(resolve, 200));
|
this.timerIds.push(window.setTimeout(() => resolve(), 200));
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user