aboutsummaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2021-04-11 21:07:48 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2021-04-11 22:34:55 +0900
commit6767b38c8e57c9f436936dc02ad1c8c4ffd043b2 (patch)
tree85ff0045eb047cb208f315d6a0be6b3a801d2607 /src/console
parent618fb497c443662531eb3befe7696a04efe9651d (diff)
Reload colorscheme on mode changed
Diffstat (limited to 'src/console')
-rw-r--r--src/console/components/Console.tsx6
1 files changed, 4 insertions, 2 deletions
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":