2
0
Files
bot/apps/viewer/layouts/ErrorPage.tsx

34 lines
884 B
TypeScript
Raw Normal View History

2021-12-23 16:31:56 +01:00
import React from 'react'
2022-08-08 08:21:36 +02:00
import { getViewerUrl, isEmpty } from 'utils'
2021-12-23 16:31:56 +01:00
export const ErrorPage = ({ error }: { error: Error }) => {
2021-12-23 16:31:56 +01:00
return (
<div
style={{
height: '100vh',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'column',
}}
>
2022-08-08 08:21:36 +02:00
{isEmpty(getViewerUrl()) ? (
<>
<h1 style={{ fontWeight: 'bold', fontSize: '30px' }}>
NEXT_PUBLIC_VIEWER_URL is missing
</h1>
<h2>
Make sure to configure the viewer properly (
<a href="https://docs.typebot.io/self-hosting/configuration#viewer">
https://docs.typebot.io/self-hosting/configuration#viewer
</a>
)
</h2>
</>
) : (
2022-09-21 08:00:25 +02:00
<p style={{ fontSize: '24px' }}>{error.message}</p>
)}
2021-12-23 16:31:56 +01:00
</div>
)
}