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
Game preview #892
Game preview #892
Conversation
import React from 'react'; | ||
import Gon from 'gon'; | ||
import LanguageIcon from '../LanguageIcon'; | ||
import '../../../../css/gamePreview.scss'; |
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.
У нас в проекте стили не импортируются в js. Все линки на стили в html прописаны. Поэтому импорт пропиши в style.scss.
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.
fixed
import '../../../../css/gamePreview.scss'; | ||
|
||
const GamePreview = () => { | ||
const players = Gon.getAsset('players'); |
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.
Мы вроде обсуждали, что компоненты на нижнем уровне ничего не должны знать про то, откуда берутся данные. Поэтому просто прокинь в пропсы информацию по игрокам.
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.
Да, я сделал быстро по колхозному и забыл исправить. А на каком уровне тогда определять players из gon? Внутри rootContainer ?
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.
Да, можно и там.
Если совсем по честному, то можно на этапе конфигурации стора инициализировать данные для превью. Потому что в проекте уже давно принято все данные с сервера загонять в стор, а так же отдельные запросы на сервер прогонять через редаксовский стор.
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.
fixed
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.
не fixed (( Как на уровень стора данные эти закинуть ?
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.
падают тесты RootContainer
Codecov Report
@@ Coverage Diff @@
## master #892 +/- ##
==========================================
+ Coverage 76.42% 77.12% +0.69%
==========================================
Files 91 91
Lines 1671 1674 +3
==========================================
+ Hits 1277 1291 +14
+ Misses 394 383 -11
Continue to review full report at Codecov.
|
closes #817
Добавить превью на страницу с игрой
Добавлен компонент GamePreview, как прелоадер.