Make error message not scare people away

This commit is contained in:
Nicholas Zuber 2018-11-11 17:16:49 -05:00
parent fcd10917d3
commit c21f62f8bc
2 changed files with 11 additions and 4 deletions

View File

@ -3,7 +3,11 @@ import styled from 'react-emotion';
const Message = styled('p')({
color: '#eb3349',
fontWeight: 500
fontWeight: 500,
'a': {
color: '#eb3349',
fontWeight: 500,
}
});
export default function ErrorMessage ({children, props}) {

View File

@ -6,6 +6,7 @@ import styled from 'react-emotion';
import Icon from '../../components/Icon';
import Logo from '../../components/Logo';
import LoadingIcon from '../../components/LoadingIcon';
import ErrorMessage from '../../components/ErrorMessage';
import {routes} from '../../constants';
import {Filters} from '../../constants/filters';
import {withOnEnter, withTooltip} from '../../enhance';
@ -838,9 +839,11 @@ export default function Scene ({
<LoadingIcon />
</LoaderContainer>
) : fetchingNotificationsError ? (
<LoaderContainer style={{flexDirection: 'column'}}>
<p>OOPSIE WOOPSIE!! Uwu An error occurred when fetching notifications.</p>
<p><a onClick={() => onFetchNotifications()} href="#">Try again</a></p>
<LoaderContainer style={{flexDirection: 'column', textAlign: 'center'}}>
<ErrorMessage>
An error occurred when fetching notifications. <br />
<a onClick={() => onFetchNotifications()} href="#">Try again?</a>
</ErrorMessage>
</LoaderContainer>
) : notifications.length <= 0 ? (
<Message>