From 7cf0eb511ab25c1882d6cd45df487566cb1af17d Mon Sep 17 00:00:00 2001 From: Sung-Hyun Kang Date: Mon, 17 Jun 2024 14:19:23 -0500 Subject: [PATCH] Add componentDidMount for initial render --- .../NotificationConsole/NotificationConsoleComponent.tsx | 4 ++++ src/Utils/NotificationConsoleUtils.ts | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Explorer/Menus/NotificationConsole/NotificationConsoleComponent.tsx b/src/Explorer/Menus/NotificationConsole/NotificationConsoleComponent.tsx index bc083d82f..664ba99d4 100644 --- a/src/Explorer/Menus/NotificationConsole/NotificationConsoleComponent.tsx +++ b/src/Explorer/Menus/NotificationConsole/NotificationConsoleComponent.tsx @@ -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, diff --git a/src/Utils/NotificationConsoleUtils.ts b/src/Utils/NotificationConsoleUtils.ts index 68ce772f2..b3c63e5a7 100644 --- a/src/Utils/NotificationConsoleUtils.ts +++ b/src/Utils/NotificationConsoleUtils.ts @@ -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); }