-
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
Feat/create cart #19
Feat/create cart #19
Conversation
8154bc8
to
8d11cdf
Compare
optionValue: SyliusProductOptionValue, | ||
options: SyliusProductOption[] | ||
): { name: string; value: string } => { | ||
const rightOption = options.filter((option) => |
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.
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 => ({ |
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.
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: '', |
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.
pourquoi on la laisse vide là ?
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.
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 () => { |
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.
faudrait pas juste qu'on configure le prettier ? surtout si j'arrive à faire marcher mon front et que je commence à coder haha
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.
Si 👍
No description provided.