@modal routed site.com/post not site.ru/page/post
Unanswered
Anthony Fubon posted this in #help-forum
Hi all.
Can you please tell me how to make the opening of a modal window through the router without the Photos folder? That the path was site.com/slug. When I remove the photos folder, the modal window opens but goes to the page.
Can you please tell me how to make the opening of a modal window through the router without the Photos folder? That the path was site.com/slug. When I remove the photos folder, the modal window opens but goes to the page.
8 Replies
Ok i dont get why you removing the photos folder?
The thing you are trying to do is: Parallel Routes(2 routes rendered in parallel on the same page) + Intercepting Routes (Intercepting another route with the same name)
I need Url site.com/photo1
I found a way to redirect from the site.com/photos path to the home page.
@ClownDo you happen to know how to push data from the page.tsx array to @modal/[slug]page.tsx ?
Lakeland Terrier
I am not exactly sure what you are trying to do, but maybe understanding promises in react will help.
https://www.dhiwise.com/post/how-to-handle-asynchronous-code-with-react-promise
https://www.dhiwise.com/post/how-to-handle-asynchronous-code-with-react-promise
and a typescript focused lesson
https://www.codecademy.com/resources/docs/typescript/promises
https://www.codecademy.com/resources/docs/typescript/promises