-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kevincai/back cart #26
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Remove the page.tsx before mergin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work on this! lots of clean queries! lmk if you got any questions about anything i wrote. i'd prob also just do a run through to see if all the queries are working again after going through any changes. also make sure to fill out the PR description before merging!
} | ||
} | ||
|
||
export async function fetchUserCart( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd say for all queries that are rn taking the userId
as a parameter, you can remove it. i don't think yall are using an auth/profile context, so i'd say when you're calling these queries from your components, it's probably easier to just omit getting the userId
there and passing it to the queries. rather i'd say it'd be easier to just use the supabase.auth.getUser()
function (which returns current logged in user which makes sense b/c all of these queries should only be available to person who's logged in at the moment) inside these queries and you can get the userId
off of the object returned here.
Refactored |
What's new in this PR
Description
Back end cart
Screenshots
How to review
Next steps
Relevant Links
Online sources
Related PRs
🛍 CC: @EthanAuyeung