W
Wasp-lang7mo ago
Matt

Adding Locify pages to OpenSaaS app.

Hi! I am new to development and keen to expand my new SaaS instance - To add new pre-coded pages from Locify (AI front-end developer) do I need to add something specific to main.wasp? I assume I need to add a new page to front end and look for dependancies to include - Just unsure if I also add something specific to main.wasp. Any help or examples are really appreciated
2 Replies
kapa.ai
kapa.ai7mo ago
Hi @Matt. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- To add new pages to your Wasp application, you indeed need to make changes to your main.wasp file. Specifically, you need to add a new page and route declaration for each new page you want to add. Here is an example of how you can add a new page:
route HelloRoute { path: "/hello/:name", to: HelloPage }
page HelloPage {
component: import { HelloPage } from "@src/HelloPage"
}
route HelloRoute { path: "/hello/:name", to: HelloPage }
page HelloPage {
component: import { HelloPage } from "@src/HelloPage"
}
In this example, a new page is created with the name HelloPage, and a route is defined for this page at the path /hello/:name. The HelloPage component is imported from the src/HelloPage file. You can replace HelloPage with the name of your new page, and @src/HelloPage with the path to the file that exports your new page's component. If your new pages from Locify have any dependencies, you would need to ensure those dependencies are installed in your project and imported in the files where they are used. For more detailed instructions on adding new pages and routes, you can refer to the Wasp tutorial on adding a second page (https://wasp-lang.dev/docs/tutorial/pages#adding-a-second-page). As for integrating pages from Locify specifically, I'm afraid I don't have enough information to give you a confident answer yet. You might need to consult Locify's documentation or support for more specific instructions. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Matt, 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?
martinsos
martinsos7mo ago
Yup, bot gave a quite good answer here! I would advise reading a bit through the Wasp docs, or at least doing the basic tutorial: it will take 45 minutes, but you will have a much better understanding of Wasp (and therefore OpenSaas). https://wasp-lang.dev/docs/tutorial/create . Good luck and let us know if we can help with something else!
1. Creating a New Project | Wasp
You'll need to have the latest version of Wasp installed locally to follow this tutorial. If you haven't installed it yet, check out the QuickStart guide!
Want results from more Discord servers?
Add your server