Beginner question. Set as the home page?
I've created a secondary page. called imageGallery. how do i set this page as the home page? or what code is needed in the main.wasp to load content from the imageGallery
4 Replies
Hi @johne5. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To set your
imageGallery
page as the home page in Wasp, you need to modify the routing in your main.wasp
file. Here's how you can do it:
1. First, make sure you have a page declaration for your imageGallery
in main.wasp
. It should look something like this:
2. Then, you need to change the root route to point to your ImageGalleryPage
. Find the route declaration for the root path ("/") and update it to:
This will make your ImageGalleryPage
the home page of your application.
For more detailed information on how routing works in Wasp, you can refer to the Wasp tutorial on Pages & Routes.
Remember to keep your wasp start
command running in the background, as it will automatically pick up these changes and restart your app.
Wasp Tutorial: Pages & Routes
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @johne5, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?good bot 🙂 That should do it - it comes down to assigning the default path, "/" to the page you wish to see there
yep, that was easy
now i need to figure out the new errors 😦
Kapa is your friend, don't be shy to ask 😄