From 81d012b0cbcd10b9105ec27b0d8c4884afa541d8 Mon Sep 17 00:00:00 2001 From: enes Date: Tue, 19 Nov 2024 10:01:02 +0100 Subject: [PATCH] refactor(settings): add readOnly to remove warnings for wip checkboxes --- src/pages/settings/preference.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/pages/settings/preference.tsx b/src/pages/settings/preference.tsx index 82c84ee..cb41186 100644 --- a/src/pages/settings/preference.tsx +++ b/src/pages/settings/preference.tsx @@ -21,12 +21,14 @@ export const PreferencesSetting = () => { useEffect(() => { if (user?.pubkey) { + const hexPubkey = user.pubkey as string fetchEventFromUserRelays( { kinds: [NDKKind.AppSpecificData], - '#d': ['degmods'] + '#d': ['degmods'], + authors: [hexPubkey] }, - user.pubkey as string, + hexPubkey, UserRelaysType.Both ).then((event) => { if (event) { @@ -119,6 +121,7 @@ export const PreferencesSetting = () => { className='CheckboxMain' name='notificationsSettings' checked + readOnly />
@@ -130,6 +133,7 @@ export const PreferencesSetting = () => { className='CheckboxMain' name='notificationsSettings' checked + readOnly />
@@ -141,6 +145,7 @@ export const PreferencesSetting = () => { className='CheckboxMain' name='notificationsSettings' checked + readOnly />
@@ -152,6 +157,7 @@ export const PreferencesSetting = () => { className='CheckboxMain' name='notificationsSettings' checked + readOnly />
@@ -163,6 +169,7 @@ export const PreferencesSetting = () => { className='CheckboxMain' name='notificationsSettings' checked + readOnly />
@@ -212,6 +219,7 @@ export const PreferencesSetting = () => { className='CheckboxMain' name='WoTZap' checked + readOnly /> -- 2.34.1