ApexFossa45
ApexFossa45
WWasp
Created by ApexFossa45 on 12/16/2024 in #đŸ™‹questions
Routing to another page
Hi, I'm getting type errors when trying to route to another page. e.g. a profile/:id page. I am aware of this documentation: https://wasp-lang.dev/docs/advanced/links. But when I try to use <Link to="/profile/:id" params={{ id: creation.user.id }} className="text-blue-500 hover:underline" > {creation.user.username} </Link> -- i get this exact error: [ Wasp ] ext-src/featured-creations/FeaturedCreationsPage.tsx(129,15): error TS2820: Type '"/profile/:id"' is not assignable to type '"/" | "/login" | "/signup" | "/request-password-reset" | "/password-reset" | "/email-verification" | "/account" | "/demo-app" | "/admin-users" | "/pricing" | "/checkout" | ... 11 more ... | "/admin/messages"'. Did you mean '"/profile/:id?"'? -- i am using // Define the route for My Profile page route MyProfileRoute { path: "/profile/:id?", to: UserProfilePage } How can I fix this please?
7 replies
WWasp
Created by ApexFossa45 on 12/6/2024 in #đŸ™‹questions
How to render pdfs within an opensaas project
within a opensaas project, using wasp-lang. How do i make it so that, pdfs can be clicked on and seen in the front-end? I'm trying to use this: For a guide on how to create Ai Creations, check out the <a className="underline text-blue-200 hover:text-blue-300" href="/User_Guide_to_generate_and_upload_ai_images.pdf" download>User Guide</a>. And the folder structure is within the /public. but it is not working? note there's also a static folder, within client/static for images. but its not working as expected for the pdfs?
9 replies
WWasp
Created by ApexFossa45 on 11/28/2024 in #đŸ™‹questions
How to redirect from server in google oath 2.0 to my new domain?
Hi, having issues with redirecting from google oath 2.0, which points to the fly io server (ai-creations-central-server.fly.dev/auth/google/callback) for the authentication, and it works succesfully. But when logging in using google auth, it redirects to the fly io dns: https://ai-creations-central-client.fly.dev/ question is, how do i get it to redirect to my new dns (which is working): https://aicreationscentral.com ? Thank you in advance
24 replies
WWasp
Created by ApexFossa45 on 11/6/2024 in #đŸ™‹questions
Object literal may only specify known properties
Hi, having an issue where calling an operation to create user comments doesn't work due to issues with typescript. I currently have this as the function definition export const createComment: CreateComment = async ({ fileId, content }, context: any) => { // code to create user comments here given a fileId and the content }) Where I also set the type for CreateComment as: type CreateComment = (args: { fileId: string; content: string }, context: any) => Promise<CommentWithUser>; type CommentWithUser = Comment & { user: { id: string; username: string; }; }; and extra note is the main.wasp has the correct definition: action createComment { fn: import createComment from "@src/featured-creations/operations", entities: [Comment, User, File], } -- My question is, why is it giving me type errors, when I have both, the fileId, and the content, defined as arguments within the CreateComment type as shown above? [ Wasp ] ext-src/featured-creations/FeaturedCreationsPage.tsx(65,56): error TS2353: Object literal may only specify known properties, and 'content' does not exist in type '{ fileId: string; }'. I tried running wasp clean to see if it was an issue with outdated build files but to no success. Appreciate any assistance Thanks, Apex
27 replies