-
Notifications
You must be signed in to change notification settings - Fork 13
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
HT7 #54
base: master
Are you sure you want to change the base?
HT7 #54
Conversation
…r disabling buttons
|
||
const mapStateToProps = state => ({ | ||
sending: orderSendingSelector(state), | ||
pathname: state.router.location.pathname, |
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.
используйте селекторы, в т.ч. в connected-react-router есть свои селекторы, которые можно так же использовать
<CSSTransition | ||
key={id} | ||
timeout={500} | ||
classNames={{ ...styles }} |
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.
сюда лучше не передавать лишние стили, которые не касаются анимации (либо отдельный файл сделать, либо из объекта стилей отобрать нужное)
|
||
return <Route path="/restaurants/:restId" component={Restaurants} />; | ||
return ( | ||
<Switch> |
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.
отличное решение, у меня не так красиво :(
'/api/order', | ||
{ | ||
method: 'POST', | ||
headers: { |
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.
вот эти все низкоуровневые штуки лучше делать в middleware/api.js, на занятие расскажу почему
отличная работа! |
No description provided.