mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-18 19:23:40 +00:00
Fix add relay
This commit is contained in:
parent
1dfad47396
commit
c1569a3903
@ -44,9 +44,9 @@ export const login = async ({privkey, pubkey}: {privkey?: string, pubkey?: strin
|
||||
navigate('/notes/network')
|
||||
}
|
||||
|
||||
export const addRelay = async relay => {
|
||||
export const addRelay = async url => {
|
||||
const person = get(user)
|
||||
const modify = relays => relays.concat(relay)
|
||||
const modify = relays => relays.concat({url, write: '!'})
|
||||
|
||||
// Set to defaults to support anonymous usage
|
||||
defaults.relays = modify(defaults.relays)
|
||||
|
@ -63,7 +63,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
{#if joined}
|
||||
<button class="flex gap-3 items-center text-light" on:click={() => removeRelay(relay.url)}>
|
||||
<button class="flex gap-3 items-center text-light" on:click={() => removeRelay(relay)}>
|
||||
<i class="fa fa-right-from-bracket" /> Leave
|
||||
</button>
|
||||
{:else}
|
||||
|
@ -26,7 +26,7 @@
|
||||
return toast.show("error", "That isn't a valid websocket url")
|
||||
}
|
||||
|
||||
addRelay({url})
|
||||
addRelay(url)
|
||||
modal.set(null)
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user