2
0

build(viewer): 🔊 Better log when can't find a typebot

This commit is contained in:
Baptiste Arnaud
2022-05-20 14:14:37 -07:00
parent 24b077c0e2
commit 0f06aae80c
2 changed files with 31 additions and 6 deletions

View File

@ -11,8 +11,25 @@ export const ErrorPage = ({ error }: { error: Error }) => {
flexDirection: 'column',
}}
>
<h1 style={{ fontWeight: 'bold', fontSize: '30px' }}>{error.name}</h1>
<h2>{error.message}</h2>
{!process.env.NEXT_PUBLIC_VIEWER_URL ? (
<>
<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>
</>
) : (
<>
<h1 style={{ fontWeight: 'bold', fontSize: '30px' }}>{error.name}</h1>
<h2>{error.message}</h2>
</>
)}
</div>
)
}