From 6767b38c8e57c9f436936dc02ad1c8c4ffd043b2 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 11 Apr 2021 21:07:48 +0900 Subject: Reload colorscheme on mode changed --- src/console/components/Console.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/console/components/Console.tsx b/src/console/components/Console.tsx index 508c6eb..c8642c8 100644 --- a/src/console/components/Console.tsx +++ b/src/console/components/Console.tsx @@ -11,8 +11,10 @@ const Console: React.FC = () => { const refreshColorScheme = useColorSchemeRefresh(); React.useEffect(() => { - refreshColorScheme(); - }, []); + if (state.mode !== "") { + refreshColorScheme(); + } + }, [state.mode]); switch (state.mode) { case "command": -- cgit v1.2.3