🧑💻 Allow for custom 404 system messages
This commit is contained in:
@@ -312,3 +312,12 @@ The related environment variables are listed here but you are probably not inter
|
|||||||
| NEXT_PUBLIC_POSTHOG_HOST | https://app.posthog.com | PostHog API Host |
|
| NEXT_PUBLIC_POSTHOG_HOST | https://app.posthog.com | PostHog API Host |
|
||||||
|
|
||||||
</Accordion>
|
</Accordion>
|
||||||
|
|
||||||
|
<Accordion title="System labels">
|
||||||
|
|
||||||
|
| Parameter | Default | Description |
|
||||||
|
| ------------------------------- | ---------------------------------------- | ----------- |
|
||||||
|
| NEXT_PUBLIC_VIEWER_404_TITLE | 404 | |
|
||||||
|
| NEXT_PUBLIC_VIEWER_404_SUBTITLE | The bot you're looking for doesn't exist | |
|
||||||
|
|
||||||
|
</Accordion>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import { env } from '@typebot.io/env'
|
||||||
|
|
||||||
export const NotFoundPage = () => (
|
export const NotFoundPage = () => (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@@ -8,7 +10,9 @@ export const NotFoundPage = () => (
|
|||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<h1 style={{ fontWeight: 'bold', fontSize: '30px' }}>404</h1>
|
<h1 style={{ fontWeight: 'bold', fontSize: '30px' }}>
|
||||||
<h2>The bot you're looking for doesn't exist</h2>
|
{env.NEXT_PUBLIC_VIEWER_404_TITLE}
|
||||||
|
</h1>
|
||||||
|
<h2>{env.NEXT_PUBLIC_VIEWER_404_SUBTITLE}</h2>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
11
packages/env/env.ts
vendored
11
packages/env/env.ts
vendored
@@ -99,6 +99,11 @@ const baseEnv = {
|
|||||||
),
|
),
|
||||||
NEXT_PUBLIC_ONBOARDING_TYPEBOT_ID: z.string().min(1).optional(),
|
NEXT_PUBLIC_ONBOARDING_TYPEBOT_ID: z.string().min(1).optional(),
|
||||||
NEXT_PUBLIC_BOT_FILE_UPLOAD_MAX_SIZE: z.coerce.number().optional(),
|
NEXT_PUBLIC_BOT_FILE_UPLOAD_MAX_SIZE: z.coerce.number().optional(),
|
||||||
|
NEXT_PUBLIC_VIEWER_404_TITLE: z.string().optional().default('404'),
|
||||||
|
NEXT_PUBLIC_VIEWER_404_SUBTITLE: z
|
||||||
|
.string()
|
||||||
|
.optional()
|
||||||
|
.default("The bot you're looking for doesn't exist"),
|
||||||
},
|
},
|
||||||
runtimeEnv: {
|
runtimeEnv: {
|
||||||
NEXT_PUBLIC_E2E_TEST: getRuntimeVariable('NEXT_PUBLIC_E2E_TEST'),
|
NEXT_PUBLIC_E2E_TEST: getRuntimeVariable('NEXT_PUBLIC_E2E_TEST'),
|
||||||
@@ -109,6 +114,12 @@ const baseEnv = {
|
|||||||
NEXT_PUBLIC_BOT_FILE_UPLOAD_MAX_SIZE: getRuntimeVariable(
|
NEXT_PUBLIC_BOT_FILE_UPLOAD_MAX_SIZE: getRuntimeVariable(
|
||||||
'NEXT_PUBLIC_BOT_FILE_UPLOAD_MAX_SIZE'
|
'NEXT_PUBLIC_BOT_FILE_UPLOAD_MAX_SIZE'
|
||||||
),
|
),
|
||||||
|
NEXT_PUBLIC_VIEWER_404_TITLE: getRuntimeVariable(
|
||||||
|
'NEXT_PUBLIC_VIEWER_404_TITLE'
|
||||||
|
),
|
||||||
|
NEXT_PUBLIC_VIEWER_404_SUBTITLE: getRuntimeVariable(
|
||||||
|
'NEXT_PUBLIC_VIEWER_404_SUBTITLE'
|
||||||
|
),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
const githubEnv = {
|
const githubEnv = {
|
||||||
|
|||||||
Reference in New Issue
Block a user