diff --git a/web/src/components/api-docs.tsx b/web/src/components/api-docs.tsx index 339febd..7211fd9 100644 --- a/web/src/components/api-docs.tsx +++ b/web/src/components/api-docs.tsx @@ -27,7 +27,11 @@ import { Separator } from "./ui/separator"; export default function APIDocs() { const { t } = useTranslation() - const base_url = (window as any).__BICHON_BASE__ || ''; + const rawBase: string = (window as any).__BICHON_BASE__ || ''; + const normalized = rawBase.replace(/\/+$/, ''); + const base_url = normalized.startsWith('http') + ? normalized + : `${window.location.origin}${normalized}`; const docsOptions = [ { name: t('apiDocs.swaggerUI'), path: `${base_url}/api-docs/swagger` }, diff --git a/web/src/features/dashboard/index.tsx b/web/src/features/dashboard/index.tsx index 5335894..578d47d 100644 --- a/web/src/features/dashboard/index.tsx +++ b/web/src/features/dashboard/index.tsx @@ -278,9 +278,11 @@ export default function MailArchiveDashboard() { const dataPoint = payload[0].payload; const fullDate = formatTooltipDate(dataPoint.timestamp_ms, currentLocale); return ( -
{fullDate}
-{t('dashboard.emails')}: {formatNumber(dataPoint.count)}
+{fullDate}
++ {t('dashboard.emails')}: {formatNumber(dataPoint.count)} +