Add componentDidMount for initial render
This commit is contained in:
parent
f7b7d135df
commit
7cf0eb511a
|
@ -57,6 +57,10 @@ export class NotificationConsoleComponent extends React.Component<
|
||||||
this.prevHeaderStatus = undefined;
|
this.prevHeaderStatus = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public componentDidMount() {
|
||||||
|
this.componentDidUpdate(this.props, this.state);
|
||||||
|
}
|
||||||
|
|
||||||
public componentDidUpdate(
|
public componentDidUpdate(
|
||||||
prevProps: NotificationConsoleComponentProps,
|
prevProps: NotificationConsoleComponentProps,
|
||||||
prevState: NotificationConsoleComponentState,
|
prevState: NotificationConsoleComponentState,
|
||||||
|
|
|
@ -11,7 +11,6 @@ function log(type: ConsoleDataType, message: string): () => void {
|
||||||
}).format(new Date());
|
}).format(new Date());
|
||||||
|
|
||||||
useNotificationConsole.getState().setNotificationConsoleData({ type, date, message, id });
|
useNotificationConsole.getState().setNotificationConsoleData({ type, date, message, id });
|
||||||
console.log(message, id);
|
|
||||||
return () => useNotificationConsole.getState().setInProgressConsoleDataIdToBeDeleted(id);
|
return () => useNotificationConsole.getState().setInProgressConsoleDataIdToBeDeleted(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue