Skip to content

Commit

Permalink
Fix sentry issues:
Browse files Browse the repository at this point in the history
- Use handle instead of click
- Clear timeout if component is to be destroyed
  • Loading branch information
misterpekert committed Dec 22, 2023
1 parent 5064427 commit ea773f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion components/SpinButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/>
</template>
<script setup>
import { ref } from '#imports'
import { ref, defineAsyncComponent, onBeforeUnmount } from '#imports'
const { $sentryCaptureException } = useNuxtApp()
const ConfirmModal = defineAsyncComponent(() => import('./ConfirmModal'))
Expand Down Expand Up @@ -152,6 +152,8 @@ const onConfirmClosed = () => {
showConfirm.value = false
}
onBeforeUnmount(() => clearTimeout(timer))
defineExpose({ handle: onClick })
</script>

Expand Down
2 changes: 1 addition & 1 deletion pages/unsubscribe/[[id]].vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
icon-name="trash-alt"
label="Leave this community"
class="mt-2"
@click="leave"
@handle="leave"
/>
</div>
</div>
Expand Down

0 comments on commit ea773f9

Please sign in to comment.