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

Feat/create cart #19

Merged
merged 4 commits into from
Nov 21, 2023
Merged

Feat/create cart #19

merged 4 commits into from
Nov 21, 2023

Conversation

DuvCharles
Copy link
Collaborator

No description provided.

optionValue: SyliusProductOptionValue,
options: SyliusProductOption[]
): { name: string; value: string } => {
const rightOption = options.filter((option) =>
Copy link

Choose a reason for hiding this comment

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

je pense qu'en terme de naming option ça passe, et tu peux utiliser option.value pour le return
parce que là il faut relire / se souvenir que optionValue.value === option.value

@@ -0,0 +1,6 @@
import { Money } from '../types';

export const normalizePrice = (amount: number): Money => ({
Copy link

Choose a reason for hiding this comment

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

on pourrait mettre la currency en param optionnel avec EUR en défaut ?
et peut etre centsPriceToUnitsPrice ? je sais pas trop dans quel contexte on va vouloir appeler cette fonction mais vu que c'est dans utils autant la rendre un peu générique

export const normalizeCart = (syliusCart: SyliusCart): Cart => {
return {
id: syliusCart.tokenValue,
checkoutUrl: '',
Copy link

Choose a reason for hiding this comment

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

pourquoi on la laisse vide là ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Parce que le checkout est pas géré pour le moment et j'ai aucune idée de ce qu'on va faire :D

@@ -162,13 +171,13 @@ export const removeFromCart = () => {};
export const updateCart = () => {};

// Site
export const getMenu = async () => {
export const getMenu = async () => {
Copy link

Choose a reason for hiding this comment

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

faudrait pas juste qu'on configure le prettier ? surtout si j'arrive à faire marcher mon front et que je commence à coder haha

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Si 👍

@DuvCharles DuvCharles merged commit de3a0ed into sylext-v2 Nov 21, 2023
1 check passed
@DuvCharles DuvCharles deleted the feat/create-cart branch November 21, 2023 16:12
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.

2 participants