diff --git a/src/components/settings-modal/plebbit-options/plebbit-options.tsx b/src/components/settings-modal/plebbit-options/plebbit-options.tsx index b0ca7cd2..6ac833ad 100644 --- a/src/components/settings-modal/plebbit-options/plebbit-options.tsx +++ b/src/components/settings-modal/plebbit-options/plebbit-options.tsx @@ -12,7 +12,7 @@ interface SettingsProps { maticRpcRef?: RefObject; avaxRpcRef?: RefObject; plebbitRpcRef?: RefObject; - nodeDataPathRef?: RefObject; + plebbitDataPathRef?: RefObject; } const IPFSGatewaysSettings = ({ ipfsGatewayUrlsRef, mediaIpfsGatewayUrlRef }: SettingsProps) => { @@ -119,21 +119,23 @@ const PlebbitRPCSettings = ({ plebbitRpcRef }: SettingsProps) => { ); }; -const NodeDataPathSettings = ({ nodeDataPathRef }: SettingsProps) => { +const PlebbitDataPathSettings = ({ plebbitDataPathRef }: SettingsProps) => { const plebbitRpc = usePlebbitRpcSettings(); const { plebbitRpcSettings } = plebbitRpc || {}; const isConnectedToRpc = plebbitRpc?.state === 'succeeded'; - const path = plebbitRpcSettings?.plebbitOptions?.dataPath || ''; + const path = plebbitRpcSettings?.plebbitOptions?.plebbitDataPath || ''; return ( -
+
- +
); }; +const isElectron = window.isElectron === true; + const PlebbitOptions = () => { const { t } = useTranslation(); const account = useAccount(); @@ -147,7 +149,7 @@ const PlebbitOptions = () => { const maticRpcRef = useRef(null); const avaxRpcRef = useRef(null); const plebbitRpcRef = useRef(null); - const nodeDataPathRef = useRef(null); + const plebbitDataPathRef = useRef(null); const handleSave = async () => { const ipfsGatewayUrls = ipfsGatewayUrlsRef.current?.value.split('\n').map((url) => url.trim()); @@ -158,7 +160,7 @@ const PlebbitOptions = () => { const maticRpcUrls = maticRpcRef.current?.value.split('\n').map((url) => url.trim()); const avaxRpcUrls = avaxRpcRef.current?.value.split('\n').map((url) => url.trim()); const plebbitRpcClientsOptions = plebbitRpcRef.current?.value.trim(); - const dataPath = nodeDataPathRef.current?.value.trim(); + const plebbitDataPath = plebbitDataPathRef.current?.value.trim(); const chainProviders = { eth: { @@ -189,7 +191,7 @@ const PlebbitOptions = () => { pubsubHttpClientsOptions, chainProviders, plebbitRpcClientsOptions, - dataPath, + plebbitDataPath, }, }); alert('Options saved.'); @@ -230,17 +232,19 @@ const PlebbitOptions = () => {
- node RPC: + plebbit RPC:
-
- node data path: - - - -
+ {isElectron && ( +
+ plebbit data path: + + + +
+ )} ); };