diff --git a/app/(protected)/dashboard/urls/meta-chart.tsx b/app/(protected)/dashboard/urls/meta-chart.tsx index 8c38a57..47c18ad 100644 --- a/app/(protected)/dashboard/urls/meta-chart.tsx +++ b/app/(protected)/dashboard/urls/meta-chart.tsx @@ -274,7 +274,7 @@ export function DailyPVUVChart({ value={e.value} > - {e.label} + {t(e.label)} {e.key > TeamPlanQuota[user.team!].SL_AnalyticsRetention && ( diff --git a/app/(protected)/dashboard/urls/meta.tsx b/app/(protected)/dashboard/urls/meta.tsx index e0a2ae3..9e6806d 100644 --- a/app/(protected)/dashboard/urls/meta.tsx +++ b/app/(protected)/dashboard/urls/meta.tsx @@ -2,6 +2,7 @@ import { useState } from "react"; import { UrlMeta, User } from "@prisma/client"; +import { useTranslations } from "next-intl"; import useSWR from "swr"; import { TeamPlanQuota } from "@/config/team"; @@ -28,6 +29,7 @@ export interface UrlMetaProps { } export default function UserUrlMetaInfo({ user, action, urlId }: UrlMetaProps) { + const t = useTranslations("Components"); const [timeRange, setTimeRange] = useState("24h"); const { data, isLoading } = useSWR( `${action}?id=${urlId}&range=${timeRange}`, @@ -45,12 +47,13 @@ export default function UserUrlMetaInfo({ user, action, urlId }: UrlMetaProps) { if (!data || data.length === 0) { return ( - No Visits + {t("No Visits")} - You don't have any visits yet in{" "} - {DATE_DIMENSION_ENUMS.find( - (e) => e.value === timeRange, - )?.label.toLowerCase()} + {t("You don't have any visits yet in")}{" "} + {t( + DATE_DIMENSION_ENUMS.find((e) => e.value === timeRange)?.label || + "", + )} .