diff --git a/src/features/greeting/options/GreetingOptions.jsx b/src/features/greeting/options/GreetingOptions.jsx index ed6dcacb..814c1421 100644 --- a/src/features/greeting/options/GreetingOptions.jsx +++ b/src/features/greeting/options/GreetingOptions.jsx @@ -1,5 +1,6 @@ import { useT } from 'contexts'; import { useState } from 'react'; +import EventBus from 'utils/eventbus'; import { Header, @@ -240,6 +241,7 @@ const GreetingOptions = ({ currentSubSection, onSubSectionChange, sectionName }) const color = event.target.value; setGreetingColor(color); localStorage.setItem('greetingColor', color); + EventBus.emit('refresh', 'greeting'); }; return ( diff --git a/src/features/quote/options/QuoteOptions.jsx b/src/features/quote/options/QuoteOptions.jsx index 0d77d172..fdef3931 100644 --- a/src/features/quote/options/QuoteOptions.jsx +++ b/src/features/quote/options/QuoteOptions.jsx @@ -1,6 +1,7 @@ import { useT } from 'contexts'; import variables from 'config/variables'; import React, { useState, useEffect } from 'react'; +import EventBus from 'utils/eventbus'; import { MdCancel, MdAdd, @@ -199,6 +200,7 @@ const QuoteOptions = ({ currentSubSection, onSubSectionChange, sectionName }) => const color = event.target.value; setQuoteColor(color); localStorage.setItem('quoteColor', color); + EventBus.emit('refresh', 'quote'); }; return ( diff --git a/src/features/time/options/TimeOptions.jsx b/src/features/time/options/TimeOptions.jsx index db4d0686..563d2c2b 100644 --- a/src/features/time/options/TimeOptions.jsx +++ b/src/features/time/options/TimeOptions.jsx @@ -1,5 +1,6 @@ import { useT } from 'contexts'; import React, { useState } from 'react'; +import EventBus from 'utils/eventbus'; import { Header, Row, Content, Action, PreferencesWrapper, Section } from 'components/Layout/Settings'; import { Checkbox, Dropdown, Radio } from 'components/Form/Settings'; @@ -30,6 +31,7 @@ const TimeOptions = ({ currentSubSection, onSubSectionChange, sectionName }) => setSecondColour(colour); } localStorage.setItem(type, colour); + EventBus.emit('refresh', 'clock'); }; const WidgetType = () => { @@ -220,6 +222,7 @@ const TimeOptions = ({ currentSubSection, onSubSectionChange, sectionName }) => const color = event.target.value; setClockColor(color); localStorage.setItem('clockColor', color); + EventBus.emit('refresh', 'clock'); }; return (