Refer to relay.tools for relay setup

This commit is contained in:
Jon Staab
2024-09-11 11:33:50 -07:00
parent 0ae02f2537
commit e9cbfec76d
6 changed files with 114 additions and 8 deletions
+12 -2
View File
@@ -3,18 +3,28 @@
import Masonry from "svelte-bricks"
import {displayRelayUrl} from "@welshman/util"
import {relaySearch} from "@welshman/app"
import {createScroller} from '@lib/html'
import Icon from "@lib/components/Icon.svelte"
import {makeSpacePath} from "@app/routes"
import {userMembership, discoverRelays} from "@app/state"
let term = ""
let limit = 20
$: relays = $relaySearch.searchOptions(term)
const loadMore = async () => {
limit += 20
}
$: relays = $relaySearch.searchOptions(term).slice(0, limit)
onMount(() => {
const sub = discoverRelays()
const scroller = createScroller(loadMore)
return () => sub.close()
return () => {
sub.close()
scroller.stop()
}
})
</script>