Closed technophile-04 closed 9 months ago
From https://github.com/BuidlGuidl/grants.buidlguidl.com/issues/4#issue-2112986098 instead of creating an API endpoint for submitting the grant form, I used Next Server action wanted to try it out 😅 and it surprisingly works really nice!
But please let me know if we should create API endpoint it should be pretty easy we just need to move the server action function body inside API route handler with little minor tweaks 🙌
could you attach a good seed for the database? So we can test locally easily (some builders, etc)
Ohh yes yes, I have been thinking about this the plan I had in mind to seed data into local firebase emulator is :
Create a seed
folder inside (packages/nextjs/
) its needs to inside nextjs
right ? because we want to access fireabseAdmin sdk ?
Create a file data.json
and when script.ts
this script.ts
will create collections and documents according to seed/data.json
And we can add a script inside package.json
eg. yarn seed
which will run node script.ts
what do you think?
Will create a PR for this 🙌
The seed stuff sounds great @technophile-04!
The seed + script could even be inside the service/database
folder... but up to you!
Merging this! (left a comment here: https://github.com/BuidlGuidl/grants.buidlguidl.com/pull/8#discussion_r1479927835)
Description
Fixes #4
TLDR:
/api/builders/:builderAddress
Demo video :
https://github.com/BuidlGuidl/grants.buidlguidl.com/assets/80153681/367285bc-854d-499c-8d9b-7e5c868e6810
DONE:
- [X] Create basic form with inputs - [x] Check for bg builder - [x] Add basic validation - [x] Sign message functionality - [X] ~Creating mock api route~ Used Next server actions instead - [x] Clean up