use shorter store syntax
This commit is contained in:
@@ -35,20 +35,13 @@ export function Settings(props: SettingsProps) {
|
||||
<Flex direction="column" gap=".5rem">
|
||||
<Checkbox
|
||||
checked={appSettings.showLocations}
|
||||
onChange={(e) =>
|
||||
setAppSettings((prev) => ({ ...prev, showLocations: (e.target as any).checked }))
|
||||
}
|
||||
onChange={(e) => setAppSettings({ showLocations: (e.target as any).checked })}
|
||||
>
|
||||
Show locations
|
||||
</Checkbox>
|
||||
<Checkbox
|
||||
checked={appSettings.useSavedBackgrounds}
|
||||
onChange={(e) =>
|
||||
setAppSettings((prev) => ({
|
||||
...prev,
|
||||
useSavedBackgrounds: (e.target as any).checked,
|
||||
}))
|
||||
}
|
||||
onChange={(e) => setAppSettings({ useSavedBackgrounds: (e.target as any).checked })}
|
||||
>
|
||||
Use favorited backgrounds
|
||||
</Checkbox>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Accessor, JSX, createContext, createMemo, useContext } from 'solid-js';
|
||||
import { Accessor, JSX, createContext, useContext } from 'solid-js';
|
||||
import { SetStoreFunction } from 'solid-js/store';
|
||||
import { sample } from '~/lib/array';
|
||||
import { createLocalStore } from '~/lib/create-local-store';
|
||||
|
||||
Reference in New Issue
Block a user