mirror of
https://github.com/coracle-social/flotilla.git
synced 2025-12-10 19:07:06 +00:00
Redirect to space if we have a platform relay
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import {onMount} from 'svelte'
|
||||||
|
import {goto} from "$app/navigation"
|
||||||
import Icon from "@lib/components/Icon.svelte"
|
import Icon from "@lib/components/Icon.svelte"
|
||||||
import Link from "@lib/components/Link.svelte"
|
import Link from "@lib/components/Link.svelte"
|
||||||
import Button from "@lib/components/Button.svelte"
|
import Button from "@lib/components/Button.svelte"
|
||||||
@@ -6,11 +8,18 @@
|
|||||||
import SpaceAdd from "@app/components/SpaceAdd.svelte"
|
import SpaceAdd from "@app/components/SpaceAdd.svelte"
|
||||||
import ChatStart from "@app/components/ChatStart.svelte"
|
import ChatStart from "@app/components/ChatStart.svelte"
|
||||||
import {pushModal} from "@app/modal"
|
import {pushModal} from "@app/modal"
|
||||||
import {PLATFORM_NAME} from "@app/state"
|
import {makeSpacePath} from "@app/routes"
|
||||||
|
import {PLATFORM_NAME, PLATFORM_RELAY} from "@app/state"
|
||||||
|
|
||||||
const addSpace = () => pushModal(SpaceAdd)
|
const addSpace = () => pushModal(SpaceAdd)
|
||||||
|
|
||||||
const startChat = () => pushModal(ChatStart)
|
const startChat = () => pushModal(ChatStart)
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
if (PLATFORM_RELAY) {
|
||||||
|
goto(makeSpacePath(PLATFORM_RELAY))
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="hero min-h-screen">
|
<div class="hero min-h-screen">
|
||||||
|
|||||||
Reference in New Issue
Block a user