mindreaderlupoDO
WWasp-lang
•Created by Ricardo Batista on 4/24/2024 in #đŸ™‹questions
Suggested cookie consent plugin?
https://www.npmjs.com/package/react-cookie-consent
This one worked pretty easy for me
14 replies
WWasp-lang
•Created by mindreaderlupoDO on 4/12/2024 in #đŸ™‹questions
Problems in action.ts
Oh great that helped. Thank you very much @Vinny (@Wasp) @Gwaggli
12 replies
WWasp-lang
•Created by mindreaderlupoDO on 4/12/2024 in #đŸ™‹questions
Problems in action.ts
of course:
...
action createProject {
fn: import { createProject } from "@src/server/actions.js",
entities: [Project]
}
action createQuestionnaire {
fn: import { createQuestionnaire } from "@src/server/actions.js",
entities: [Questionnaire]
}
action updateQuestionnaireSettings {
fn: import { updateQuestionnaireSettings } from "@src/server/actions.js",
entities: [Questionnaire]
}
action updateQuestionnaireQuestions {
fn: import { updateQuestionnaireQuestions } from "@src/server/actions.js",
entities: [Questionnaire, Question]
}
action answerQuestionnaire {
fn: import { answerQuestionnaire } from "@src/server/actions.js",
entities: [QuestionnaireAnswer]
}
...
The solution-ideas brought up by the bot, I already checked.
BTW: What is the best way for code-pasting/syntax-highlighting here in discord?
12 replies
WWasp-lang
•Created by rithvik12345678 on 4/3/2024 in #đŸ™‹questions
Error when trying to login with google oauth
https://discord.com/channels/686873244791210014/1222916615151161374
This thread helped me to fix that issue, I changed the getGoogleUserFields function
10 replies
WWasp-lang
•Created by IamIconLiving on 3/29/2024 in #đŸ™‹questions
Possibility to disable wasp reload on UI file changes?
When I change just a div className and I hit Ctrl+s, alt-tab to switch from VSCode to the browser, than I see the change for approx. Half a second and then everything reloads which takes another second. It disrupts the workflow and is annoying. Maybe it's especially annoying because of my 1-screen setup
20 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/28/2024 in #đŸ™‹questions
Google Auth in Prod
This one I had is still from the time when I forked the OpenSaas Repository. Changed it to the new implementation and now its working.
Since it was always working on localhost, I probably would have never had the idea to check this part of the implementation
...Thanks!
7 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/28/2024 in #đŸ™‹questions
Google Auth in Prod
Thank you so much. Its working after applying the right code for getGoogleUserFields.
export const getGoogleUserFields = defineUserSignupFields({
email: (data: any) => data.profile.emails[0].value,
username: (data: any) => data.profile.displayName,
isAdmin: (data: any) => adminEmails.includes(data.profile.emails[0].value),
});
7 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/25/2024 in #đŸ™‹questions
Need help with joined tables
Thanks again for the suport!
14 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/25/2024 in #đŸ™‹questions
Need help with joined tables
and in the queries.ts:
export const getQuestionnaires: GetQuestionnaires<QuestionnaireWithProject[]> = (async (_args, context) => {...}
14 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/25/2024 in #đŸ™‹questions
Need help with joined tables
... Wow, after failing over 3 hours this afternoon, I finally got it...
My solution (based on the linked thread solution 2):
import { QuestionnaireWithProject } from '../../shared/types';
const [questionnairesList, setQuestionnairesList] = useState<QuestionnaireWithProject[]>([]);
useEffect(() => {
if (questionnaires) {
setQuestionnairesList(questionnaires as QuestionnaireWithProject[]);
console.log(questionnairesList)
}
}, [questionnaires]);
14 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/25/2024 in #đŸ™‹questions
Need help with joined tables
Here I tried the approach with satisfies. the queries.ts file works without any issue. but in the implementation with useQuery, I am stuck
14 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/25/2024 in #đŸ™‹questions
Need help with joined tables
14 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/25/2024 in #đŸ™‹questions
Need help with joined tables
14 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/25/2024 in #đŸ™‹questions
Need help with joined tables
14 replies
WWasp-lang
•Created by smilebasti on 3/16/2024 in #đŸ™‹questions
action calling action not working. Bad programming or issue?
There is a thread where I had the same issue. Tl;Dr import { createFile } from 'wasp/client/operations';
43 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/9/2024 in #đŸ™‹questions
import actions into main.wasp
Oh, now I see, it needs to be wasp/client/operations .... its finally working... thanks for all your support. At the end it was my fault... but during this discussion I learned a lot. Thanks!
21 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/9/2024 in #đŸ™‹questions
import actions into main.wasp
21 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/9/2024 in #đŸ™‹questions
import actions into main.wasp
I tried to hand over a fake second agrument:
createProject({id: 123},' ')
This makes the errors in the IDE and console disappear for the time being. However, the errors displayed in the browser remain:
[plugin:vite:import-analysis] Failed to resolve import "wasp/ext-src/server/actions.js" from "../sdk/wasp/dist/server/operations/actions/index.js". Does the file exist?
So it actually seems to have more to do with the import of the function.21 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/9/2024 in #đŸ™‹questions
import actions into main.wasp
21 replies
WWasp-lang
•Created by mindreaderlupoDO on 3/9/2024 in #đŸ™‹questions
import actions into main.wasp
Okay, looks like I made mistakes in the implementation, I was on the wrong path due to the types of error messages I got.
But still I have trouble to understand whats happening.
All the errors are related to the following:
In my component, I have
const newProject = createProject({id: 132,});
in Actions I have implemented it like this: export const createProject: CreateProject<Pick<Project, 'id'>, Project> = async ({ id }, context) => {...function definition...}
Of course the problem is, that I only pass 1 property, "context" is missing. How do I do that?
If I look at other implementations of actions in the Open SaaS Code, I see the same thing: E. g. DemoAppPage.tsx line 182: const response = await generateGptResponse({
hours: todaysHours,
});
According to the definition in actions.ts line 102, there is also the property 'context':
export const generateGptResponse: GenerateGptResponse<GptPayload, GeneratedSchedule> = async ({ hours }, context) => { ... }
Sorry, might be very stupid but I am lost at this point. Thank you!21 replies