forked from coracle/flotilla
make close button / backdrop work on direct invite link page (#177)
Co-authored-by: userAdityaa <aditya.chaudhary1558@gmail.com> Co-committed-by: userAdityaa <aditya.chaudhary1558@gmail.com>
This commit is contained in:
@@ -6,7 +6,6 @@
|
|||||||
import Close from "@assets/icons/close.svg?dataurl"
|
import Close from "@assets/icons/close.svg?dataurl"
|
||||||
import Icon from "@lib/components/Icon.svelte"
|
import Icon from "@lib/components/Icon.svelte"
|
||||||
import Button from "@lib/components/Button.svelte"
|
import Button from "@lib/components/Button.svelte"
|
||||||
import {clearModals} from "@app/util/modal"
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
onClose?: any
|
onClose?: any
|
||||||
@@ -56,7 +55,7 @@
|
|||||||
<div class={wrapperClass}>
|
<div class={wrapperClass}>
|
||||||
<div class={innerClass} transition:fly>
|
<div class={innerClass} transition:fly>
|
||||||
{#if !noEscape}
|
{#if !noEscape}
|
||||||
<Button class={buttonClass} onclick={clearModals}>
|
<Button class={buttonClass} onclick={onClose}>
|
||||||
<Icon icon={Close} size={6} />
|
<Icon icon={Close} size={6} />
|
||||||
</Button>
|
</Button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -4,13 +4,15 @@
|
|||||||
import Dialog from "@lib/components/Dialog.svelte"
|
import Dialog from "@lib/components/Dialog.svelte"
|
||||||
import SpaceInviteAccept from "@app/components/SpaceInviteAccept.svelte"
|
import SpaceInviteAccept from "@app/components/SpaceInviteAccept.svelte"
|
||||||
|
|
||||||
|
const close = () => goto("/home")
|
||||||
|
|
||||||
const children = {
|
const children = {
|
||||||
component: SpaceInviteAccept,
|
component: SpaceInviteAccept,
|
||||||
props: {
|
props: {
|
||||||
invite: $page.url.href,
|
invite: $page.url.href,
|
||||||
back: () => goto("/home"),
|
back: close,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Dialog {children} />
|
<Dialog {children} onClose={close} />
|
||||||
|
|||||||
Reference in New Issue
Block a user