diff --git a/next.config.js b/next.config.js
index 8a0c6569..92b66943 100644
--- a/next.config.js
+++ b/next.config.js
@@ -3,19 +3,19 @@ require('dotenv').config();
const path = require('path');
const pkg = require('./package.json');
-const basePath = process.env.BASE_PATH || '';
-const collectApiEndpoint = process.env.COLLECT_API_ENDPOINT || '';
-const cloudMode = process.env.CLOUD_MODE || '';
-const cloudUrl = process.env.CLOUD_URL || '';
-const defaultLocale = process.env.DEFAULT_LOCALE || '';
-const disableLogin = process.env.DISABLE_LOGIN || '';
-const disableUI = process.env.DISABLE_UI || '';
-const forceSSL = process.env.FORCE_SSL || '';
-const frameAncestors = process.env.ALLOWED_FRAME_URLS || '';
-const privateMode = process.env.PRIVATE_MODE || '';
-const shareUrlHost = process.env.SHARE_HOST_URL || '';
-const trackerScriptHost = process.env.TRACKER_SCRIPT_HOST || '';
-const trackerScriptName = process.env.TRACKER_SCRIPT_NAME || '';
+const basePath = process.env.BASE_PATH;
+const collectApiEndpoint = process.env.COLLECT_API_ENDPOINT;
+const cloudMode = process.env.CLOUD_MODE;
+const cloudUrl = process.env.CLOUD_URL;
+const defaultLocale = process.env.DEFAULT_LOCALE;
+const disableLogin = process.env.DISABLE_LOGIN;
+const disableUI = process.env.DISABLE_UI;
+const forceSSL = process.env.FORCE_SSL;
+const frameAncestors = process.env.ALLOWED_FRAME_URLS;
+const privateMode = process.env.PRIVATE_MODE;
+const shareUrlHost = process.env.SHARE_URL_HOST;
+const trackerScriptHost = process.env.TRACKER_SCRIPT_HOST;
+const trackerScriptName = process.env.TRACKER_SCRIPT_NAME;
const contentSecurityPolicy = [
`default-src 'self'`,
diff --git a/src/app/(main)/App.tsx b/src/app/(main)/App.tsx
index 406c2f16..efb38043 100644
--- a/src/app/(main)/App.tsx
+++ b/src/app/(main)/App.tsx
@@ -27,7 +27,7 @@ export function App({ children }) {
{children}
{process.env.NODE_ENV === 'production' && !pathname.includes('/share/') && (
-
+
)}
>
);
diff --git a/src/app/(main)/console/TestConsole.tsx b/src/app/(main)/console/TestConsole.tsx
index 86a4792e..37075cf9 100644
--- a/src/app/(main)/console/TestConsole.tsx
+++ b/src/app/(main)/console/TestConsole.tsx
@@ -80,7 +80,7 @@ export function TestConsole({ websiteId }: { websiteId: string }) {
diff --git a/src/app/(main)/websites/[websiteId]/realtime/RealtimeCountries.tsx b/src/app/(main)/websites/[websiteId]/realtime/RealtimeCountries.tsx
index 506d5733..2dd69146 100644
--- a/src/app/(main)/websites/[websiteId]/realtime/RealtimeCountries.tsx
+++ b/src/app/(main)/websites/[websiteId]/realtime/RealtimeCountries.tsx
@@ -13,7 +13,7 @@ export function RealtimeCountries({ data }) {
({ x: code }) => (
{countryNames[code]}
diff --git a/src/components/hooks/useCountryNames.ts b/src/components/hooks/useCountryNames.ts
index acfada44..17b594b6 100644
--- a/src/components/hooks/useCountryNames.ts
+++ b/src/components/hooks/useCountryNames.ts
@@ -10,7 +10,7 @@ export function useCountryNames(locale: string) {
const [list, setList] = useState(countryNames[locale] || enUS);
async function loadData(locale: string) {
- const { data } = await httpGet(`${process.env.basePath}/intl/country/${locale}.json`);
+ const { data } = await httpGet(`${process.env.basePath || ''}/intl/country/${locale}.json`);
if (data) {
countryNames[locale] = data;
diff --git a/src/components/hooks/useLanguageNames.ts b/src/components/hooks/useLanguageNames.ts
index d4bfbf2f..276faa14 100644
--- a/src/components/hooks/useLanguageNames.ts
+++ b/src/components/hooks/useLanguageNames.ts
@@ -10,7 +10,7 @@ export function useLanguageNames(locale) {
const [list, setList] = useState(languageNames[locale] || enUS);
async function loadData(locale) {
- const { data } = await httpGet(`${process.env.basePath}/intl/language/${locale}.json`);
+ const { data } = await httpGet(`${process.env.basePath || ''}/intl/language/${locale}.json`);
if (data) {
languageNames[locale] = data;
diff --git a/src/components/hooks/useLocale.ts b/src/components/hooks/useLocale.ts
index 5e4e1ce8..69e7cc41 100644
--- a/src/components/hooks/useLocale.ts
+++ b/src/components/hooks/useLocale.ts
@@ -19,7 +19,9 @@ export function useLocale() {
const dateLocale = getDateLocale(locale);
async function loadMessages(locale: string) {
- const { ok, data } = await httpGet(`${process.env.basePath}/intl/messages/${locale}.json`);
+ const { ok, data } = await httpGet(
+ `${process.env.basePath || ''}/intl/messages/${locale}.json`,
+ );
if (ok) {
messages[locale] = data;
diff --git a/src/components/metrics/BrowsersTable.tsx b/src/components/metrics/BrowsersTable.tsx
index c0c741cf..004b5e43 100644
--- a/src/components/metrics/BrowsersTable.tsx
+++ b/src/components/metrics/BrowsersTable.tsx
@@ -11,7 +11,7 @@ export function BrowsersTable(props: MetricsTableProps) {
return (
{country && (
)}
diff --git a/src/components/metrics/CountriesTable.tsx b/src/components/metrics/CountriesTable.tsx
index e38666bf..3e7c0af0 100644
--- a/src/components/metrics/CountriesTable.tsx
+++ b/src/components/metrics/CountriesTable.tsx
@@ -27,7 +27,7 @@ export function CountriesTable({
label={formatCountry(code)}
>
diff --git a/src/components/metrics/DevicesTable.tsx b/src/components/metrics/DevicesTable.tsx
index 4df331a4..e3db60ea 100644
--- a/src/components/metrics/DevicesTable.tsx
+++ b/src/components/metrics/DevicesTable.tsx
@@ -11,7 +11,9 @@ export function DevicesTable(props: MetricsTableProps) {
return (
diff --git a/src/components/metrics/WorldMap.tsx b/src/components/metrics/WorldMap.tsx
index 31d55dd0..27d0f57c 100644
--- a/src/components/metrics/WorldMap.tsx
+++ b/src/components/metrics/WorldMap.tsx
@@ -54,7 +54,7 @@ export function WorldMap({ data = [], className }: { data?: any[]; className?: s
>
-
+
{({ geographies }) => {
return geographies.map(geo => {
const code = ISO_COUNTRIES[geo.id];