-
Notifications
You must be signed in to change notification settings - Fork 3
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(attributions): add attributions to menu #643
Conversation
|
||
import styles from './menu.styl'; | ||
|
||
const Menu: FunctionComponent = () => { | ||
const [showOverlay, setShowOverlay] = useState(false); | ||
const [overlayContentType, setOverlayContentType] = useState(''); |
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.
One variable should be enough here like
const [overlayType, setOverlayType] = ...
setOverlayType('about')
setOverlayType('attributions')
setOverlayType(null) // to hide the overlay
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.
oh true 🙈 thanks!
@@ -20,21 +20,16 @@ import Attributions from '../attributions/attributions'; | |||
import styles from './menu.styl'; | |||
|
|||
const Menu: FunctionComponent = () => { | |||
const [showOverlay, setShowOverlay] = useState(false); | |||
const [overlayContentType, setOverlayContentType] = useState(''); | |||
const [overlayType, setOverlayType] = useState<string | null>(''); |
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.
the default value should be null
not ''
No description provided.