docs: add support for Layer widget (#4262)

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
This commit is contained in:
ayaang-layer
2024-11-12 08:07:33 -05:00
committed by GitHub
parent bcd68e0f19
commit 306784c31b
2 changed files with 14 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import "@/styles/tailwind.css";
import glob from "fast-glob";
import { type Metadata } from "next";
import { Jost } from "next/font/google";
import Script from "next/script";
export const metadata: Metadata = {
title: {
@@ -27,6 +28,18 @@ const RootLayout = async ({ children }: { children: React.ReactNode }) => {
return (
<html lang="en" className="h-full" suppressHydrationWarning>
<head>
{process.env.NEXT_PUBLIC_LAYER_API_KEY && (
<Script
strategy="afterInteractive"
src="https://storage.googleapis.com/generic-assets/buildwithlayer-widget-4.js"
primary-color="#00C4B8"
api-key={process.env.NEXT_PUBLIC_LAYER_API_KEY}
walkthrough-enabled="false"
design-style="copilot"
/>
)}
</head>
<body className={`flex min-h-full bg-white antialiased dark:bg-zinc-900 ${jost.className}`}>
<Providers>
<div className="w-full">

View File

@@ -108,6 +108,7 @@
"INVITE_DISABLED",
"IS_FORMBRICKS_CLOUD",
"MAIL_FROM",
"NEXT_PUBLIC_LAYER_API_KEY",
"NEXT_PUBLIC_DOCSEARCH_APP_ID",
"NEXT_PUBLIC_DOCSEARCH_API_KEY",
"NEXT_PUBLIC_DOCSEARCH_INDEX_NAME",