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 Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import {clearModals} from "@app/util/modal"
|
||||
|
||||
type Props = {
|
||||
onClose?: any
|
||||
@@ -56,7 +55,7 @@
|
||||
<div class={wrapperClass}>
|
||||
<div class={innerClass} transition:fly>
|
||||
{#if !noEscape}
|
||||
<Button class={buttonClass} onclick={clearModals}>
|
||||
<Button class={buttonClass} onclick={onClose}>
|
||||
<Icon icon={Close} size={6} />
|
||||
</Button>
|
||||
{/if}
|
||||
|
||||
@@ -4,13 +4,15 @@
|
||||
import Dialog from "@lib/components/Dialog.svelte"
|
||||
import SpaceInviteAccept from "@app/components/SpaceInviteAccept.svelte"
|
||||
|
||||
const close = () => goto("/home")
|
||||
|
||||
const children = {
|
||||
component: SpaceInviteAccept,
|
||||
props: {
|
||||
invite: $page.url.href,
|
||||
back: () => goto("/home"),
|
||||
back: close,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<Dialog {children} />
|
||||
<Dialog {children} onClose={close} />
|
||||
|
||||
Reference in New Issue
Block a user