🔥 Remove VIEWER_URL_INTERNAL variable
BREAKING CHANGE: NEXT_PUBLIC_VIEWER_INTERNAL does not exist anymore as typebot.io now directly points to the viewer project
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { env } from '@typebot.io/env'
|
||||
import React from 'react'
|
||||
import { getViewerUrl } from '@typebot.io/lib/getViewerUrl'
|
||||
|
||||
export const ErrorPage = ({ error }: { error: Error }) => {
|
||||
return (
|
||||
@@ -13,7 +13,7 @@ export const ErrorPage = ({ error }: { error: Error }) => {
|
||||
padding: '0 1rem',
|
||||
}}
|
||||
>
|
||||
{!getViewerUrl() ? (
|
||||
{!env.NEXT_PUBLIC_VIEWER_URL[0] ? (
|
||||
<>
|
||||
<h1 style={{ fontWeight: 'bold', fontSize: '30px' }}>
|
||||
NEXT_PUBLIC_VIEWER_URL is missing
|
||||
|
||||
@@ -3,9 +3,9 @@ import Head from 'next/head'
|
||||
import Script from 'next/script'
|
||||
import React from 'react'
|
||||
import { isNotEmpty } from '@typebot.io/lib'
|
||||
import { getViewerUrl } from '@typebot.io/lib/getViewerUrl'
|
||||
import { Settings } from '@typebot.io/schemas'
|
||||
import { defaultSettings } from '@typebot.io/schemas/features/typebot/settings/constants'
|
||||
import { env } from '@typebot.io/env'
|
||||
|
||||
type SEOProps = {
|
||||
url: string
|
||||
@@ -31,7 +31,10 @@ export const SEO = ({
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
href={favIconUrl ?? defaultSettings.metadata.favIconUrl(getViewerUrl())}
|
||||
href={
|
||||
favIconUrl ??
|
||||
defaultSettings.metadata.favIconUrl(env.NEXT_PUBLIC_VIEWER_URL[0])
|
||||
}
|
||||
/>
|
||||
<meta name="title" content={title ?? typebotName} />
|
||||
<meta
|
||||
@@ -56,7 +59,10 @@ export const SEO = ({
|
||||
<meta
|
||||
property="og:image"
|
||||
itemProp="image"
|
||||
content={imageUrl ?? defaultSettings.metadata.imageUrl(getViewerUrl())}
|
||||
content={
|
||||
imageUrl ??
|
||||
defaultSettings.metadata.imageUrl(env.NEXT_PUBLIC_VIEWER_URL[0])
|
||||
}
|
||||
/>
|
||||
|
||||
<meta property="twitter:card" content="summary_large_image" />
|
||||
@@ -71,7 +77,10 @@ export const SEO = ({
|
||||
/>
|
||||
<meta
|
||||
property="twitter:image"
|
||||
content={imageUrl ?? defaultSettings.metadata.imageUrl(getViewerUrl())}
|
||||
content={
|
||||
imageUrl ??
|
||||
defaultSettings.metadata.imageUrl(env.NEXT_PUBLIC_VIEWER_URL[0])
|
||||
}
|
||||
/>
|
||||
</Head>
|
||||
{isNotEmpty(googleTagManagerId) && (
|
||||
|
||||
Reference in New Issue
Block a user