refactor: cleanup and split quote custom settings

This commit is contained in:
David Ralph
2024-06-15 11:48:55 +01:00
parent 9fa4d6d2d8
commit de3ef5a93f
5 changed files with 140 additions and 131 deletions

View File

@@ -7,7 +7,8 @@ import values from 'utils/data/slider_values.json';
import EventBus from 'utils/eventbus';
const PreferencesWrapper = ({ children, ...props }) => {
const [shown, setShown] = useState(localStorage.getItem(props.setting) === 'true');
const [shown, setShown] = useState(localStorage.getItem(props.setting) === 'true' || props.default || false);
console.log(props.default)
EventBus.on('toggle', (setting) => {
if (setting === props.setting) {