2024-04-24 22:18:58 +08:00
|
|
|
import { localUserSettings } from '../../core/local-states/useUserSettings';
|
2018-09-14 02:09:30 +08:00
|
|
|
|
|
|
|
export default function getFromUserSettings(setting, defaultValue) {
|
2024-04-24 22:18:58 +08:00
|
|
|
const userSetting = localUserSettings()[setting];
|
2018-09-14 02:09:30 +08:00
|
|
|
if (userSetting !== undefined) {
|
2024-04-24 22:18:58 +08:00
|
|
|
return userSetting;
|
2018-09-14 02:09:30 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return defaultValue;
|
|
|
|
}
|