File size: 875 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
// @flow
import React from 'react';
import { Emoji, Heading, Description, Card } from './style';
import { ViewGrid, CenteredGrid } from 'src/components/layout';
type Props = {
emoji?: string,
heading?: string,
subheading?: string,
};
export const ErrorView = (props: Props) => {
const {
emoji = '😣',
heading = 'We ran into trouble loading this page',
subheading = 'You may be trying to view something that is deleted, or Spectrum is just having a hiccup. If you think something has gone wrong, please contact us.',
...rest
} = props;
return (
<ViewGrid {...rest}>
<CenteredGrid>
<Card>
<Emoji role="img" aria-label="Oops">
{emoji}
</Emoji>
<Heading>{heading}</Heading>
<Description>{subheading}</Description>
</Card>
</CenteredGrid>
</ViewGrid>
);
};
|