mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
add anon mode to catalog, fix errors
This commit is contained in:
@@ -356,7 +356,7 @@ const Thread = () => {
|
||||
let signer;
|
||||
|
||||
if (!storedSigners[selectedThread]) {
|
||||
signer = await account.plebbit.createSigner();
|
||||
signer = await account?.plebbit.createSigner();
|
||||
storedSigners[selectedThread] = { privateKey: signer?.privateKey, address: signer?.address };
|
||||
localStorage.setItem('storedSigners', JSON.stringify(storedSigners));
|
||||
|
||||
@@ -364,7 +364,7 @@ const Thread = () => {
|
||||
const signerPrivateKey = storedSigners[selectedThread].privateKey;
|
||||
|
||||
try {
|
||||
signer = await account.plebbit.createSigner({type: 'ed25519', privateKey: signerPrivateKey});
|
||||
signer = await account?.plebbit.createSigner({type: 'ed25519', privateKey: signerPrivateKey});
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
@@ -690,8 +690,8 @@ const Thread = () => {
|
||||
<tr data-type="Name">
|
||||
<td id="td-name">Name</td>
|
||||
<td>
|
||||
{account && account.author && account.author.displayName ? (
|
||||
<input name="name" type="text" tabIndex={1} value={account.author?.displayName} ref={nameRef} disabled />
|
||||
{account && account?.author && account?.author.displayName ? (
|
||||
<input name="name" type="text" tabIndex={1} value={account?.author?.displayName} ref={nameRef} disabled />
|
||||
) : (
|
||||
<input name="name" type="text" placeholder="Anonymous" tabIndex={1} ref={nameRef} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user