fix: show error properly

This commit is contained in:
EnixCoda 2019-02-19 17:51:17 +08:00
parent 254e916445
commit b01a4c418c
No known key found for this signature in database
GPG key ID: 6825847C88AA329A
2 changed files with 3 additions and 3 deletions

View file

@ -120,7 +120,7 @@ class Gitako extends React.PureComponent<Props & ConnectorState> {
<div className={'gitako-side-bar'}>
<Portal into={logoContainerElement}>
<ToggleShowButton
hasError={Boolean(error)}
error={(error)}
shouldShow={shouldShow}
toggleShowSideBar={toggleShowSideBar}
/>

View file

@ -3,11 +3,11 @@ import Icon from 'components/Icon'
import cx from 'utils/cx'
type Props = {
hasError: boolean
error: string
shouldShow: boolean
toggleShowSideBar: React.MouseEventHandler
}
export default function Logo({ hasError: error, shouldShow, toggleShowSideBar }: Props) {
export default function Logo({ error, shouldShow, toggleShowSideBar }: Props) {
return (
<div
className={cx('gitako-toggle-show-button-wrapper', {