mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-03 17:26:38 +00:00
add alaytics to saas
This commit is contained in:
@@ -18,6 +18,7 @@ import { NextIntlClientProvider } from "next-intl";
|
|||||||
import { getLocale } from "next-intl/server";
|
import { getLocale } from "next-intl/server";
|
||||||
import { Toaster } from "@app/components/ui/toaster";
|
import { Toaster } from "@app/components/ui/toaster";
|
||||||
import { build } from "@server/build";
|
import { build } from "@server/build";
|
||||||
|
import Script from "next/script";
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: `Dashboard - ${process.env.BRANDING_APP_NAME || "Pangolin"}`,
|
title: `Dashboard - ${process.env.BRANDING_APP_NAME || "Pangolin"}`,
|
||||||
@@ -62,9 +63,9 @@ export default async function RootLayout({
|
|||||||
if (build === "enterprise") {
|
if (build === "enterprise") {
|
||||||
const licenseStatusRes = await cache(
|
const licenseStatusRes = await cache(
|
||||||
async () =>
|
async () =>
|
||||||
await priv.get<AxiosResponse<GetLicenseStatusResponse>>(
|
await priv.get<AxiosResponse<GetLicenseStatusResponse>>(
|
||||||
"/license/status"
|
"/license/status"
|
||||||
)
|
)
|
||||||
)();
|
)();
|
||||||
licenseStatus = licenseStatusRes.data.data;
|
licenseStatus = licenseStatusRes.data.data;
|
||||||
} else if (build === "saas") {
|
} else if (build === "saas") {
|
||||||
@@ -84,6 +85,13 @@ export default async function RootLayout({
|
|||||||
return (
|
return (
|
||||||
<html suppressHydrationWarning lang={locale}>
|
<html suppressHydrationWarning lang={locale}>
|
||||||
<body className={`${font.className} h-screen overflow-hidden`}>
|
<body className={`${font.className} h-screen overflow-hidden`}>
|
||||||
|
{build === "saas" && (
|
||||||
|
<Script
|
||||||
|
src="https://rybbit.fossorial.io/api/script.js"
|
||||||
|
data-site-id="fe1ff2a33287"
|
||||||
|
strategy="afterInteractive"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<NextIntlClientProvider>
|
<NextIntlClientProvider>
|
||||||
<ThemeProvider
|
<ThemeProvider
|
||||||
attribute="class"
|
attribute="class"
|
||||||
|
|||||||
Reference in New Issue
Block a user