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