Skip to content
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

Merged
merged 8 commits into from
Nov 30, 2023

Conversation

BuyankhuuTsCAl
Copy link
Collaborator

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

Copy link

vercel bot commented Nov 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
shanti-project ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 30, 2023 4:10am

Copy link
Contributor

@kevinjcai kevinjcai left a 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

src/api/supabase/queries/user_queries.ts Outdated Show resolved Hide resolved
@@ -39,7 +39,7 @@ export async function fetchUserByUUID(uuid: string) {
const { data: user, error } = await supabase
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

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

src/api/supabase/queries/user_queries.ts Outdated Show resolved Hide resolved
src/api/supabase/queries/user_queries.ts Outdated Show resolved Hide resolved
*/

export async function totalNumberOfItemsInCart() {
const {
Copy link
Contributor

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
Copy link
Contributor

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() {
Copy link
Contributor

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);
Copy link
Contributor

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

@EthanAuyeung EthanAuyeung merged commit 8ddceb8 into main Nov 30, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants