refactor(settings): remove unused preferences sections
All checks were successful
Release to Staging / build_and_release (push) Successful in 1m5s
All checks were successful
Release to Staging / build_and_release (push) Successful in 1m5s
Closes #136
This commit is contained in:
parent
748cf51464
commit
d5f90012ea
@ -77,7 +77,7 @@ const SettingTabs = () => {
|
||||
},
|
||||
{
|
||||
path: appRoutes.settingsPreferences,
|
||||
label: 'Preferences (WIP)',
|
||||
label: 'Preferences',
|
||||
icon: <PreferenceSVG />
|
||||
}
|
||||
]
|
||||
|
@ -1,12 +1,6 @@
|
||||
import { NDKEvent, NDKKind } from '@nostr-dev-kit/ndk'
|
||||
import { LoadingSpinner } from 'components/LoadingSpinner'
|
||||
import { NsfwAlertPopup } from 'components/NsfwAlertPopup'
|
||||
import {
|
||||
useAppDispatch,
|
||||
useAppSelector,
|
||||
useNDKContext,
|
||||
useLocalStorage
|
||||
} from 'hooks'
|
||||
import { useAppDispatch, useAppSelector, useNDKContext } from 'hooks'
|
||||
import { kinds, UnsignedEvent, Event } from 'nostr-tools'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { toast } from 'react-toastify'
|
||||
@ -25,13 +19,6 @@ export const PreferencesSetting = () => {
|
||||
const [wotLevel, setWotLevel] = useState(userWotLevel)
|
||||
const [isSaving, setIsSaving] = useState(false)
|
||||
|
||||
const [nsfw, setNsfw] = useState(false)
|
||||
const [confirmNsfw] = useLocalStorage<boolean>('confirm-nsfw', false)
|
||||
const [showNsfwPopup, setShowNsfwPopup] = useState<boolean>(false)
|
||||
const handleNsfwConfirm = (confirm: boolean) => {
|
||||
setNsfw(confirm)
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (user?.pubkey) {
|
||||
const hexPubkey = user.pubkey as string
|
||||
@ -131,94 +118,6 @@ export const PreferencesSetting = () => {
|
||||
<div className='IBMSMSplitMainFullSideFWMid'>
|
||||
<div className='IBMSMSplitMainFullSideSec'>
|
||||
<div className='IBMSMSMBS_Write'>
|
||||
<div className='inputLabelWrapperMain'>
|
||||
<div className='labelWrapperMain'>
|
||||
<p className='labelMain'>Notifications</p>
|
||||
</div>
|
||||
<div className='inputLabelWrapperMain inputLabelWrapperMainAlt inputLabelWrapperMainAltStylized'>
|
||||
<label className='form-label labelMain'>
|
||||
When someone follows you
|
||||
</label>
|
||||
<input
|
||||
type='checkbox'
|
||||
className='CheckboxMain'
|
||||
name='notificationsSettings'
|
||||
checked
|
||||
readOnly
|
||||
/>
|
||||
</div>
|
||||
<div className='inputLabelWrapperMain inputLabelWrapperMainAlt inputLabelWrapperMainAltStylized'>
|
||||
<label className='form-label labelMain'>
|
||||
When someone mentions you
|
||||
</label>
|
||||
<input
|
||||
type='checkbox'
|
||||
className='CheckboxMain'
|
||||
name='notificationsSettings'
|
||||
checked
|
||||
readOnly
|
||||
/>
|
||||
</div>
|
||||
<div className='inputLabelWrapperMain inputLabelWrapperMainAlt inputLabelWrapperMainAltStylized'>
|
||||
<label className='form-label labelMain'>
|
||||
When someone sends a reaction to your post
|
||||
</label>
|
||||
<input
|
||||
type='checkbox'
|
||||
className='CheckboxMain'
|
||||
name='notificationsSettings'
|
||||
checked
|
||||
readOnly
|
||||
/>
|
||||
</div>
|
||||
<div className='inputLabelWrapperMain inputLabelWrapperMainAlt inputLabelWrapperMainAltStylized'>
|
||||
<label className='form-label labelMain'>
|
||||
When someone Tips/Zaps you
|
||||
</label>
|
||||
<input
|
||||
type='checkbox'
|
||||
className='CheckboxMain'
|
||||
name='notificationsSettings'
|
||||
checked
|
||||
readOnly
|
||||
/>
|
||||
</div>
|
||||
<div className='inputLabelWrapperMain inputLabelWrapperMainAlt inputLabelWrapperMainAltStylized'>
|
||||
<label className='form-label labelMain'>
|
||||
When someone re-posts your post
|
||||
</label>
|
||||
<input
|
||||
type='checkbox'
|
||||
className='CheckboxMain'
|
||||
name='notificationsSettings'
|
||||
checked
|
||||
readOnly
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className='inputLabelWrapperMain'>
|
||||
<div className='labelWrapperMain'>
|
||||
<p className='labelMain'>Not Safe For Work (NSFW)</p>
|
||||
</div>
|
||||
<div className='inputLabelWrapperMain inputLabelWrapperMainAlt inputLabelWrapperMainAltStylized'>
|
||||
<label className='form-label labelMain'>
|
||||
Show all NSFW posts
|
||||
</label>
|
||||
<input
|
||||
type='checkbox'
|
||||
className='CheckboxMain'
|
||||
name='NSFWPreference'
|
||||
checked={nsfw}
|
||||
onChange={(e) => {
|
||||
if (e.currentTarget.checked && !confirmNsfw) {
|
||||
setShowNsfwPopup(true)
|
||||
} else {
|
||||
setNsfw(e.currentTarget.checked)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className='inputLabelWrapperMain'>
|
||||
<div className='labelWrapperMain'>
|
||||
<p className='labelMain'>Web of Trust (WoT) level</p>
|
||||
@ -241,18 +140,6 @@ export const PreferencesSetting = () => {
|
||||
/>
|
||||
<p className='ZapSplitUserBoxRangeText'>{wotLevel}</p>
|
||||
</div>
|
||||
<div className='inputLabelWrapperMain inputLabelWrapperMainAlt inputLabelWrapperMainAltStylized'>
|
||||
<label className='form-label labelMain'>
|
||||
Consider those who zap/tip, regardless of WoT level
|
||||
</label>
|
||||
<input
|
||||
type='checkbox'
|
||||
className='CheckboxMain'
|
||||
name='WoTZap'
|
||||
checked
|
||||
readOnly
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className='IBMSMSMBS_WriteAction'>
|
||||
<button
|
||||
@ -263,12 +150,6 @@ export const PreferencesSetting = () => {
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
{showNsfwPopup && (
|
||||
<NsfwAlertPopup
|
||||
handleConfirm={handleNsfwConfirm}
|
||||
handleClose={() => setShowNsfwPopup(false)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user