Files
animethemes-web/src/hooks/useSetting.js
T
Manuel S b195c9d667 feat: Added missing brackets (@theinternetftw) (#136)
* Added bracket chart.
* Added border radius to all sides of cards.
* Added skeletons to home page.
* Added support for system color theme.
* Added code-splitting for GraphQL.
* Added config constants.
* Added warning banner on staging.
* Added URL caching to API resolver (only for non-page request for now).
* Made featured theme load by default.
* Changed static path fetching to only fetch paths if not on staging (except for bracket pages).
* Changed default color theme to system.
* Moved color theme toggle from navigation to profile page.
* Replaced sketchy local storage implementation with external package.
* Fixed wrong fallback for featured theme on devices which don't support our codecs.
* Fixed wrong links in footer.
* Fixed code-splitting of Prism package.
* Fixed "/" character not working in search input.
* Fixed glitching multi cover image on playlist page.
* Updated README.md.
2022-06-08 00:20:46 +02:00

8 lines
290 B
JavaScript

import useLocalStorageState from "use-local-storage-state";
export default function useSetting({ __KEY__: key, __INITIAL_VALUE__: initialValue }) {
const [setting, setSetting] = useLocalStorageState(key, { ssr: true, defaultValue: initialValue });
return [setting, setSetting];
}