-
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
Buyankhuu/fixed queries+changed store front #34
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Looks pretty good! Just a few minor changes.
LMK if you have any questions or want to give over your pr
@@ -39,7 +39,7 @@ export async function fetchUserByUUID(uuid: string) { | |||
const { data: user, error } = await supabase |
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.
look at this to use auth to grab the user (still needa test a little)
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.
Hi Kevin, thanks for the comments! Super helpful. I don't think I wrote this function so I might pass it to you but I have resolved the rest of the comments
*/ | ||
|
||
export async function totalNumberOfItemsInCart() { | ||
const { |
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.
use the helper functions
} = await supabase.auth.getUser(); | ||
|
||
if (user !== null) { | ||
const { data, error } = await supabase |
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.
use the helper function
@@ -53,107 +53,92 @@ export async function fetchUserByUUID(uuid: string) { | |||
} | |||
} | |||
|
|||
export async function getUserInfo(product: Product, isFav: boolean) { | |||
export async function getProduct() { |
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.
can you put this in the product_queries.ts
.select() | ||
.eq('user_id', user.id); | ||
if (user !== null && user !== undefined) { | ||
const specificUser = await fetchUserByUUID(user.id); |
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.
user is defined above should be okay
What's new in this PR
Description
fixed the buttons on the storefront + the shop {text} on the storefront to reflect the button selection.
Screenshots
How to review
Next steps
Relevant Links
Online sources
Related PRs
🛍 CC: @EthanAuyeung