Possible to visit Modal page regularaly? #68
-
I want to be able to allow my users to visit the page wrapped in Modal component by just visiting the URL. Right now it throws error if Modal page is visited manually. Is there anyway to accomplish both normal behavior and modal in same template? |
Beta Was this translation helpful? Give feedback.
Answered by
pascalbaljet
Dec 18, 2024
Replies: 1 comment
-
Try using a dynamic component to determine whether the page should be wrapped in a <script setup>
import { Modal } from '@inertiaui/modal-vue'
import { ref } from 'vue';
const isModal = ref(true);
</script>
<template>
<component :is="isModal ? Modal : 'div'">
<!-- content -->
</component>
</template> I'm converting this issue into a discussion as it's not really a bug. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
AUAboi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try using a dynamic component to determine whether the page should be wrapped in a
Modal
component or not. Something like this:I'm converting this issue into a discussion as it's not really a bug.