diff --git a/src/components/Filters/NsfwFilterOptions.tsx b/src/components/Filters/NsfwFilterOptions.tsx index 71392f8..05ab906 100644 --- a/src/components/Filters/NsfwFilterOptions.tsx +++ b/src/components/Filters/NsfwFilterOptions.tsx @@ -2,7 +2,7 @@ import { FilterOptions, NSFWFilter } from 'types' import { Option } from './Option' import { NsfwAlertPopup } from 'components/NsfwAlertPopup' import { useState } from 'react' -import { useLocalStorage, useSessionStorage } from 'hooks' +import { useLocalStorage } from 'hooks' import { DEFAULT_FILTER_OPTIONS } from 'utils' interface NsfwFilterOptionsProps { @@ -18,7 +18,7 @@ export const NsfwFilterOptions = ({ filterKey }: NsfwFilterOptionsProps) => { const [selectedNsfwOption, setSelectedNsfwOption] = useState< NSFWFilter | undefined >() - const [confirmNsfw] = useSessionStorage('confirm-nsfw', false) + const [confirmNsfw] = useLocalStorage('confirm-nsfw', false) const handleConfirm = (confirm: boolean) => { if (confirm && selectedNsfwOption) { setFilterOptions((prev) => ({ diff --git a/src/components/NsfwAlertPopup.tsx b/src/components/NsfwAlertPopup.tsx index dbb9c60..1685a97 100644 --- a/src/components/NsfwAlertPopup.tsx +++ b/src/components/NsfwAlertPopup.tsx @@ -1,6 +1,6 @@ import { AlertPopupProps } from 'types' import { AlertPopup } from './AlertPopup' -import { useSessionStorage } from 'hooks' +import { useLocalStorage } from 'hooks' type NsfwAlertPopup = Omit @@ -14,7 +14,7 @@ export const NsfwAlertPopup = ({ handleConfirm, handleClose }: NsfwAlertPopup) => { - const [confirmNsfw, setConfirmNsfw] = useSessionStorage( + const [confirmNsfw, setConfirmNsfw] = useLocalStorage( 'confirm-nsfw', false ) diff --git a/src/pages/settings/preference.tsx b/src/pages/settings/preference.tsx index c2b0d42..7f6c8e0 100644 --- a/src/pages/settings/preference.tsx +++ b/src/pages/settings/preference.tsx @@ -5,7 +5,7 @@ import { useAppDispatch, useAppSelector, useNDKContext, - useSessionStorage + useLocalStorage } from 'hooks' import { kinds, UnsignedEvent, Event } from 'nostr-tools' import { useEffect, useState } from 'react' @@ -26,7 +26,7 @@ export const PreferencesSetting = () => { const [isSaving, setIsSaving] = useState(false) const [nsfw, setNsfw] = useState(false) - const [confirmNsfw] = useSessionStorage('confirm-nsfw', false) + const [confirmNsfw] = useLocalStorage('confirm-nsfw', false) const [showNsfwPopup, setShowNsfwPopup] = useState(false) const handleNsfwConfirm = (confirm: boolean) => { setNsfw(confirm)