2023-08-10 15:56:36 -07:00
|
|
|
import { useLocalStorage } from "../util";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* usePreferArchive helps the user choose to try using our archive before
|
|
|
|
* using images.neopets.com, when images.neopets.com is being slow and bleh!
|
|
|
|
*/
|
|
|
|
function usePreferArchive() {
|
|
|
|
const [preferArchiveSavedValue, setPreferArchive] = useLocalStorage(
|
|
|
|
"DTIPreferArchive",
|
2023-10-24 16:45:49 -07:00
|
|
|
null,
|
2023-08-10 15:56:36 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
// Oct 13 2022: I might default this back to on again if the lag gets
|
|
|
|
// miserable again, but it's okaaay right now? ish? Bad enough that I want to
|
|
|
|
// offer this option, but decent enough that I don't want to turn it on by
|
|
|
|
// default and break new items yet!
|
|
|
|
const preferArchive = preferArchiveSavedValue ?? false;
|
|
|
|
|
|
|
|
return [preferArchive, setPreferArchive];
|
|
|
|
}
|
|
|
|
|
|
|
|
export default usePreferArchive;
|