fix api value, fix spellcheck in inputs

This commit is contained in:
Tom (plebeius.eth)
2025-05-22 17:48:00 +02:00
parent 0a5f868747
commit defeff3cf9
@@ -37,7 +37,15 @@ const IPFSGatewaysSettings = ({ ipfsGatewayUrlsRef, mediaIpfsGatewayUrlRef }: Se
</div> </div>
<span className={styles.settingTip}>NFT profile pics gateway</span> <span className={styles.settingTip}>NFT profile pics gateway</span>
<div> <div>
<input type='text' defaultValue={mediaIpfsGatewayUrl} ref={mediaIpfsGatewayUrlRef} disabled={isConnectedToRpc} /> <input
type='text'
defaultValue={mediaIpfsGatewayUrl}
ref={mediaIpfsGatewayUrlRef}
disabled={isConnectedToRpc}
autoCorrect='off'
autoCapitalize='off'
spellCheck='false'
/>
</div> </div>
</div> </div>
); );
@@ -53,7 +61,15 @@ const PubsubProvidersSettings = ({ pubsubProvidersRef }: SettingsProps) => {
return ( return (
<div className={styles.pubsubProvidersSettings}> <div className={styles.pubsubProvidersSettings}>
<textarea defaultValue={pubsubProvidersDefaultValue} ref={pubsubProvidersRef} disabled={isConnectedToRpc} autoCorrect='off' autoComplete='off' spellCheck='false' /> <textarea
defaultValue={pubsubProvidersDefaultValue}
ref={pubsubProvidersRef}
disabled={isConnectedToRpc}
autoCorrect='off'
autoCapitalize='off'
autoComplete='off'
spellCheck='false'
/>
</div> </div>
); );
}; };
@@ -98,7 +114,7 @@ const PlebbitRPCSettings = ({ plebbitRpcRef }: SettingsProps) => {
return ( return (
<div className={styles.plebbitRPCSettings}> <div className={styles.plebbitRPCSettings}>
<div> <div>
<input type='text' defaultValue={plebbitRpcClientsOptions} ref={plebbitRpcRef} /> <input type='text' defaultValue={plebbitRpcClientsOptions} ref={plebbitRpcRef} autoCorrect='off' autoCapitalize='off' spellCheck='false' />
<button onClick={() => setShowInfo(!showInfo)}>{showInfo ? 'X' : '?'}</button> <button onClick={() => setShowInfo(!showInfo)}>{showInfo ? 'X' : '?'}</button>
</div> </div>
{showInfo && ( {showInfo && (
@@ -123,12 +139,12 @@ const PlebbitDataPathSettings = ({ plebbitDataPathRef }: SettingsProps) => {
const plebbitRpc = usePlebbitRpcSettings(); const plebbitRpc = usePlebbitRpcSettings();
const { plebbitRpcSettings } = plebbitRpc || {}; const { plebbitRpcSettings } = plebbitRpc || {};
const isConnectedToRpc = plebbitRpc?.state === 'succeeded'; const isConnectedToRpc = plebbitRpc?.state === 'succeeded';
const path = plebbitRpcSettings?.plebbitOptions?.plebbitDataPath || ''; const path = plebbitRpcSettings?.plebbitOptions?.dataPath || '';
return ( return (
<div className={styles.plebbitDataPathSettings}> <div className={styles.plebbitDataPathSettings}>
<div> <div>
<input type='text' defaultValue={path} disabled={!isConnectedToRpc} ref={plebbitDataPathRef} /> <input autoCorrect='off' autoCapitalize='off' spellCheck='false' type='text' defaultValue={path} disabled={!isConnectedToRpc} ref={plebbitDataPathRef} />
</div> </div>
</div> </div>
); );