From c85d1c1d9c49643ff3714160117a317dedae2c5c Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 20 Dec 2022 17:30:47 +0000 Subject: [PATCH] Don't touch the product name option for now --- src/usePageTitle.ts | 2 +- vite.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usePageTitle.ts b/src/usePageTitle.ts index f77fee9..0e1b1a0 100644 --- a/src/usePageTitle.ts +++ b/src/usePageTitle.ts @@ -18,7 +18,7 @@ import { useEffect } from "react"; export function usePageTitle(title: string): void { useEffect(() => { - const productName = "Element Call"; + const productName = import.meta.env.VITE_PRODUCT_NAME || "Element Call"; document.title = title ? `${productName} | ${title}` : productName; }, [title]); } diff --git a/vite.config.js b/vite.config.js index b18ab74..3fbe057 100644 --- a/vite.config.js +++ b/vite.config.js @@ -31,7 +31,7 @@ export default defineConfig(({ mode }) => { svgrPlugin(), htmlTemplate.default({ data: { - title: "Element Call", + env.VITE_PRODUCT_NAME || title: "Element Call", }, }), ],