-
Notifications
You must be signed in to change notification settings - Fork 16
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
ikashyntseva: HT7 #88
base: master
Are you sure you want to change the base?
Conversation
@@ -25,7 +26,13 @@ function BasketItem({ | |||
<span className={styles.count}>{amount}</span> | |||
<Button onClick={increment} icon="plus" secondary small /> | |||
</div> | |||
<p className={cn(styles.count, styles.price)}>{subtotal} $</p> | |||
<p className={cn(styles.count, styles.price)}> | |||
{ |
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.
не очень удобный вариант использования, покажу, как это можно сделать удобнее
dispatch(push(...data)); | ||
} catch (error) { | ||
dispatch({ type: SUBMIT_ORDER + FAILURE, error }); | ||
dispatch(replace('/error', { error: error.message })); |
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.
этот error уже у вас есть state.checkout.error и лучше его брать оттуда и не использовать состояние роутера
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.
точно, я все время забываю что у меня есть в сторе
let data = ['/thankYou']; | ||
|
||
if (status !== 'ok') { | ||
action = { type: SUBMIT_ORDER + FAILURE, status }; |
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.
action = { type: SUBMIT_ORDER + FAILURE, status }; | |
action = { type: SUBMIT_ORDER + FAILURE, error: status }; |
No description provided.