mirror of
https://github.com/mue/mue.git
synced 2026-07-13 12:07:45 +02:00
refactor: cleanup and split quote custom settings
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user