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;
|
||||
}
|
||||
|
||||
public componentDidMount() {
|
||||
this.componentDidUpdate(this.props, this.state);
|
||||
}
|
||||
|
||||
public componentDidUpdate(
|
||||
prevProps: NotificationConsoleComponentProps,
|
||||
prevState: NotificationConsoleComponentState,
|
||||
|
|
|
@ -11,7 +11,6 @@ function log(type: ConsoleDataType, message: string): () => void {
|
|||
}).format(new Date());
|
||||
|
||||
useNotificationConsole.getState().setNotificationConsoleData({ type, date, message, id });
|
||||
console.log(message, id);
|
||||
return () => useNotificationConsole.getState().setInProgressConsoleDataIdToBeDeleted(id);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue