Fix auth timeout on space join, bump welshman

This commit is contained in:
Jon Staab
2024-11-14 13:45:38 -08:00
parent 1b4819c8ad
commit 8caab03e2f
4 changed files with 26 additions and 21 deletions
+2 -3
View File
@@ -1,6 +1,7 @@
<script lang="ts">
import {onMount} from "svelte"
import {page} from "$app/stores"
import {ifLet} from "@welshman/lib"
import Page from "@lib/components/Page.svelte"
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
import MenuSpace from "@app/components/MenuSpace.svelte"
@@ -14,14 +15,12 @@
const notification = deriveNotification($page.url.pathname, SPACE_FILTERS, url)
const ifLet = <T,>(x: T | undefined, f: (x: T) => void) => (x === undefined ? undefined : f(x))
const checkConnection = async () => {
ifLet(await checkRelayConnection(url), error => {
pushToast({theme: "error", message: error})
})
ifLet(await checkRelayAuth(url), error => {
ifLet(await checkRelayAuth(url, 30_000), error => {
pushToast({theme: "error", message: error})
})
}