travel-app - приложение для виртуальных путешествий по странам мира. #36
travel-app - приложение для виртуальных путешествий по странам мира. #36aleksei-bulgak-study wants to merge 99 commits intomainfrom
Conversation
feat: add react-router, base structure
feat: add main page
* feat: add countryMap component add map component add default actions and redusers to load data from server integrate map into page component * fix: replace div with Box component from material ui * fix: remove unused import Co-authored-by: aliaksei bulhak <aliaksei.bulhak@nike.com>
… component (#14) Co-authored-by: aliaksei bulhak <aliaksei.bulhak@nike.com>
Widget date, styles page, header, footer, home
* feat: update routing. add styles for not found page * fix: footer elements aligment
* feat: update loading page. add language selector * fix: hide search bar on country view page Co-authored-by: aliaksei bulhak <aliaksei.bulhak@nike.com>
Bug fixing
fix: currency nominal and add loader
* feat: add 5 tests for reducer * feat: add actions compiling tests * feat: add helpers and loading page tests Co-authored-by: Ivan <raggamix@mail.ru>
feat: add star raiting
| ) | ||
| .then((response) => response.data) | ||
| .catch((err) => { | ||
| console.log(err.response); |
| return axios | ||
| .get(url) | ||
| .then((response) => response.data); | ||
| }; |
There was a problem hiding this comment.
пока читал все файлы сервисов:
раз 100 прочитал const getSmth, раз 100 cont url = '$base url' smth, раз 100 прочитал return axios.get(url) .then((response) => response.data)...неужели так всегда ?)
| @@ -0,0 +1,59 @@ | |||
| import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; | |||
There was a problem hiding this comment.
для каждого компонента папочка есть, а для апп жалко ? ;D бесплатные же./...тогда можно будет вынести хук useStyles в отдельный файл ? или так специально задумано ?
| <Switch> | ||
| <Route path={['/countries', '/']} component={Home} exact /> | ||
| <Route path="/countries/:isoCode" component={Country} /> | ||
| <Route path="/login" component={LoginPage} /> |
| className: '' | ||
| }; | ||
|
|
||
| const mapStateToProps = (state) => ({ |
| <Grid item xs={12} md={8} className={classes.gitHubList}> | ||
| {developers.map((developer, i) => ( | ||
| <DeveloperElement | ||
| key={i.toString()} |
There was a problem hiding this comment.
index говорят не юзать в качестве ключей
| <Box className={classes.container}> | ||
| <TranslateIcon className={classes.icon}/> | ||
| <select value={currentLocale} onChange={onLanguageChange} className={classes.select}> | ||
| <option value="ru">{t('labels.locale.ru')}</option> |
There was a problem hiding this comment.
у useTranslation должны быть параметры которые отвечают за локаль, чтобы не пришлось дублировать labels.locale labels.locale labels.locale 3 раза можно просто передать парам
| }; | ||
|
|
||
| LanguageSelector.propTypes = { | ||
| currentLocale: PropTypes.oneOf(['en', 'uk', 'ru']), |
There was a problem hiding this comment.
должны быть константы, объекст с разными языками, в тип через Object.values
| const { t } = useTranslation(); | ||
|
|
||
| const match = useRouteMatch({ | ||
| path: '/countries/:isoCode', |
| test('check get video func works well', () => { | ||
| const url = 'https://www.youtube.com/watch?v=56bWMAEvSdA'; | ||
| const result = getVideoId(url); | ||
| expect(result).toEqual('56bWMAEvSdA'); |
There was a problem hiding this comment.
Use .toEqual to compare recursively all properties of object instances
../// toMatch
travel-app
travel-app - приложение для виртуальных путешествий по странам мира.

Task: https://github.com/rolling-scopes-school/tasks/blob/master/tasks/react/travel-app.md
Deploy: https://natein-travel-app.netlify.app/
Bakend repository: https://github.com/aleksei-bulgak-study/travel-app-be
Backend application: https://rss-travel-app.herokuapp.com/swagger-ui
Выполненная функциональность
Вёрстка, дизайн, UI +30
Главная страница приложения +30
Страница страны +80
Бекенд +40
Дополнительный функционал +10