-
Notifications
You must be signed in to change notification settings - Fork 63
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: Screentime warning #1686
feat: Screentime warning #1686
Conversation
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.
Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @razvan-pro)
game_frontend/public/handlebars_template.html
line 162 at r1 (raw file):
var appData = { urlForAimmoDashboard: '{% url_for_aimmo_dashboard %}', {% if request.session.screentime_warning_timeout %}screentimeWarningTimeout: \{{ request.session.screentime_warning_timeout }},{% endif %}
Is that \ needed?
game_frontend/src/components/ScreentimeWarning/index.js
line 1 at r1 (raw file):
import React, { useEffect } from 'react'
Wouldn't it be better to also import useState as well to be consistent - { useEffect, useState }?
game_frontend/src/components/ScreentimeWarning/index.js
line 46 at r1 (raw file):
const ScreentimeWarning = () => { const [open, setOpen] = React.useState(false)
So then in both of these instances we can just use useState
game_frontend/src/components/ScreentimeWarning/index.js
line 100 at r1 (raw file):
screen breaks to recharge those brain cells! </Typography> <Box css={{ mt: 2 }}>
Is the css attr the old MUI way of applying 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.
Reviewable status: 5 of 7 files reviewed, 4 unresolved discussions (waiting on @KamilPawel)
game_frontend/public/handlebars_template.html
line 162 at r1 (raw file):
Previously, KamilPawel wrote…
Is that \ needed?
Yes, that is to escape those brackets to be interpreted by handlebars template - we want to pass this to Django (the generated template won't include the )
game_frontend/src/components/ScreentimeWarning/index.js
line 1 at r1 (raw file):
Previously, KamilPawel wrote…
Wouldn't it be better to also import useState as well to be consistent - { useEffect, useState }?
👍
game_frontend/src/components/ScreentimeWarning/index.js
line 46 at r1 (raw file):
Previously, KamilPawel wrote…
So then in both of these instances we can just use useState
👍
game_frontend/src/components/ScreentimeWarning/index.js
line 100 at r1 (raw file):
Previously, KamilPawel wrote…
Is the css attr the old MUI way of applying styles?
Yeah, it took me a while to find why sx
didn't work 😆
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.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @razvan-pro)
Codecov Report
@@ Coverage Diff @@
## master #1686 +/- ##
==========================================
+ Coverage 67.22% 67.39% +0.17%
==========================================
Files 171 173 +2
Lines 3521 3549 +28
Branches 298 305 +7
==========================================
+ Hits 2367 2392 +25
- Misses 1122 1125 +3
Partials 32 32
|
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)