PteroTheme/resources/scripts/components/screens/ServerError.tsx

21 lines
483 B
TypeScript
Raw Normal View History

import React from 'react';
2020-04-17 22:43:03 +01:00
import ScreenBlock from '@/components/screens/ScreenBlock';
2020-04-17 22:43:03 +01:00
interface Props {
title?: string;
message: string;
2020-04-17 19:45:20 +01:00
onRetry?: () => void;
onBack?: () => void;
}
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}
/>
);