Intercepting route
Unanswered
Netherland Dwarf posted this in #help-forum
Netherland DwarfOP
Is i possible to create something like this:
/app list a feed of profile
click view profile, intercept to show modal of profile but if i click view profile on button it should show the page without intercepting it?
is there a way to opt out intercepting or cancel it?
/app list a feed of profile
click view profile, intercept to show modal of profile but if i click view profile on button it should show the page without intercepting it?
is there a way to opt out intercepting or cancel it?
7 Replies
Netherland DwarfOP
this is /app
when i click view profile, modal intercepts
but in the modal, if i click view profile i want to show the full page instead of intercept
but in the modal, if i click view profile i want to show the full page instead of intercept
I don't think there is a Next.js-way of doing this. However, you could just do a reload of the current page
location.reload() for now@Simon Knittel 🍹 I don't think there is a Next.js-way of doing this. However, you could just do a reload of the current page `location.reload()` for now
Netherland DwarfOP
tried but dont think it worked like that too.
for now, i just rename it to /preview/[id] for modal and when i refresh at /preview/[id] i redirect > /profile/[id]
for now, i just rename it to /preview/[id] for modal and when i refresh at /preview/[id] i redirect > /profile/[id]

so now i can
"view profile" : /profile/[id]
"check availbility" : /profile/[id]/book
without it being intercepted, using the "preview" as the intercepted and redirect to correct route
"view profile" : /profile/[id]
"check availbility" : /profile/[id]/book
without it being intercepted, using the "preview" as the intercepted and redirect to correct route
@Netherland Dwarf tried but dont think it worked like that too.
for now, i just rename it to /preview/[id] for modal and when i refresh at /preview/[id] i redirect > /profile/[id] <:thinq:1158595784938365018>
Hm, weird. I actually tried that yesterday.
I added an onClick handler to that link (View Profile) and just called location.reload() within that handler. That successfully reloaded the page
I added an onClick handler to that link (View Profile) and just called location.reload() within that handler. That successfully reloaded the page