2
0

build: add pnpm

This commit is contained in:
Baptiste Arnaud
2022-08-08 08:21:36 +02:00
parent 8c3b5058f1
commit ee338f62dc
183 changed files with 19442 additions and 18364 deletions

View File

@ -3,7 +3,7 @@ import { NotFoundPage } from 'layouts/NotFoundPage'
import { PublicTypebot } from 'models'
import { GetServerSideProps, GetServerSidePropsContext } from 'next'
import sanitizeHtml from 'sanitize-html'
import { env, isDefined, isNotDefined, omit } from 'utils'
import { env, getViewerUrl, isDefined, isNotDefined, omit } from 'utils'
import { TypebotPage, TypebotPageProps } from '../layouts/TypebotPage'
import prisma from '../libs/prisma'
@ -16,9 +16,9 @@ export const getServerSideProps: GetServerSideProps = async (
const { host, forwardedHost } = getHost(context.req)
try {
if (!host) return { props: {} }
const viewerUrls = (env('VIEWER_URL') ?? '').split(',')
const viewerUrls = (getViewerUrl({ returnAll: true }) ?? '').split(',')
const isMatchingViewerUrl =
env('E2E_TEST') === 'enabled'
env('E2E_TEST') === 'true'
? true
: viewerUrls.some(
(url) =>