Skip to content

Commit

Permalink
close on destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
sameoldlab committed Jul 30, 2024
1 parent c20738e commit a0f7f3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/ui/src/components/Common/Modal.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import '../../styles/index.css'
import { createEventDispatcher } from 'svelte'
import { createEventDispatcher, onDestroy } from 'svelte'
const dispatch = createEventDispatcher()
export let titleText = 'Title Text'
Expand Down Expand Up @@ -48,6 +48,9 @@
dialog.close()
dispatch('close')
}
onDestroy(()=>{
dispatch('close')
})
</script>

<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
Expand Down
3 changes: 3 additions & 0 deletions packages/ui/src/components/ConnectModal/ConnectModal.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script lang="ts">
import { onDestroy, onMount } from 'svelte'
import copyEN from '../../copy/copy.EN.js'
import Modal from '../Common/Modal.svelte'
import Scannable from './Scannable.svelte'
Expand All @@ -17,6 +19,7 @@
// export let accountStatus: string
// export let chainStatus
// export let showBalance: string
onDestroy(()=>{close()})
$: if (state.status === 'connected') close()
let activeRequest: Connector | null = null //config.connectors[3]
Expand Down

0 comments on commit a0f7f3e

Please sign in to comment.