2020-04-17 19:07:32 +01:00
|
|
|
import React from 'react';
|
2020-04-17 22:43:03 +01:00
|
|
|
import ScreenBlock from '@/components/screens/ScreenBlock';
|
2020-04-17 19:07:32 +01:00
|
|
|
|
2020-04-17 22:43:03 +01:00
|
|
|
interface Props {
|
2020-04-17 19:07:32 +01:00
|
|
|
title?: string;
|
|
|
|
message: string;
|
2020-04-17 19:45:20 +01:00
|
|
|
onRetry?: () => void;
|
2020-04-17 19:27:52 +01:00
|
|
|
onBack?: () => void;
|
2020-04-17 19:07:32 +01:00
|
|
|
}
|
|
|
|
|
2020-04-17 19:45:20 +01:00
|
|
|
export default ({ title, message, onBack, onRetry }: Props) => (
|
2020-04-17 22:43:03 +01:00
|
|
|
// @ts-ignore
|
|
|
|
<ScreenBlock
|
|
|
|
title={title || 'Something went wrong'}
|
|
|
|
image={'/assets/svgs/server_error.svg'}
|
|
|
|
message={message}
|
|
|
|
onBack={onBack}
|
|
|
|
onRetry={onRetry}
|
|
|
|
/>
|
2020-04-17 19:07:32 +01:00
|
|
|
);
|