🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Remove empty localization keys from multiple language files to streamline translations.
Bill Yang28602556ea89
diff --git a/client/messages/cs.json b/client/messages/cs.jsonindex 780da24ae..53279ca14 100644--- a/client/messages/cs.json+++ b/client/messages/cs.json@@ -76,8 +76,6 @@"XHLYdJ": "Cíle","9d/EEp": "Produktová analytika","5yUsUe": "Přehrávání",- "mZDrWI": "",- "5qmtY1": "","puhcpn": "Trychtýře","08hqOd": "Cesty návštěvníků","nL6Jl0": "Retence",diff --git a/client/messages/de.json b/client/messages/de.jsonindex 44fc80f89..c60b38da5 100644--- a/client/messages/de.json+++ b/client/messages/de.json@@ -76,8 +76,6 @@"XHLYdJ": "Ziele","9d/EEp": "Produktanalyse","5yUsUe": "Wiedergabe",- "mZDrWI": "",- "5qmtY1": "","puhcpn": "Trichter","08hqOd": "Pfade","nL6Jl0": "Bindung",diff --git a/client/messages/en.json b/client/messages/en.jsonindex 115399436..7783f8e76 100644--- a/client/messages/en.json+++ b/client/messages/en.json@@ -76,8 +76,6 @@"XHLYdJ": "Goals","9d/EEp": "Product Analytics","5yUsUe": "Replay",- "mZDrWI": "Feature Flags",- "5qmtY1": "Experiments","puhcpn": "Funnels","08hqOd": "Journeys","nL6Jl0": "Retention",diff --git a/client/messages/es.json b/client/messages/es.jsonindex 491eee115..19285c379 100644--- a/client/messages/es.json+++ b/client/messages/es.json@@ -76,8 +76,6 @@"XHLYdJ": "Objetivos","9d/EEp": "Analíticas de Producto","5yUsUe": "Repetición",- "mZDrWI": "",- "5qmtY1": "","puhcpn": "Embudos","08hqOd": "Viajes","nL6Jl0": "Retención",diff --git a/client/messages/fr.json b/client/messages/fr.jsonindex 533381815..cd6cce129 100644--- a/client/messages/fr.json+++ b/client/messages/fr.json@@ -76,8 +76,6 @@"XHLYdJ": "Objectifs","9d/EEp": "Analyse produit","5yUsUe": "Replay",- "mZDrWI": "",- "5qmtY1": "","puhcpn": "Entonnoirs","08hqOd": "Parcours","nL6Jl0": "Rétention",diff --git a/client/messages/it.json b/client/messages/it.jsonindex 898bc92d8..9db38a142 100644--- a/client/messages/it.json+++ b/client/messages/it.json@@ -76,8 +76,6 @@"XHLYdJ": "Obiettivi","9d/EEp": "Analisi del Prodotto","5yUsUe": "Replay",- "mZDrWI": "",- "5qmtY1": "","puhcpn": "Funnel","08hqOd": "Percorsi","nL6Jl0": "Fidelizzazione",diff --git a/client/messages/ja.json b/client/messages/ja.jsonindex ed8142bf4..52152b504 100644--- a/client/messages/ja.json+++ b/client/messages/ja.json@@ -76,8 +76,6 @@"XHLYdJ": "目標","9d/EEp": "プロダクトアナリティクス","5yUsUe": "リプレイ",- "mZDrWI": "",- "5qmtY1": "","puhcpn": "ファネル","08hqOd": "ジャーニー","nL6Jl0": "リテンション",diff --git a/client/messages/ko.json b/client/messages/ko.jsonindex 7cfe3702d..60b9e1e59 100644--- a/client/messages/ko.json+++ b/client/messages/ko.json@@ -76,8 +76,6 @@"XHLYdJ": "목표","9d/EEp": "제품 분석","5yUsUe": "리플레이",- "mZDrWI": "",- "5qmtY1": "","puhcpn": "퍼널","08hqOd": "여정","nL6Jl0": "리텐션",diff --git a/client/messages/pl.json b/client/messages/pl.jsonindex 476d7c535..fb408974b 100644--- a/client/messages/pl.json+++ b/client/messages/pl.json@@ -76,8 +76,6 @@"XHLYdJ": "Cele","9d/EEp": "Analityka produktowa","5yUsUe": "Odtwarzanie",- "mZDrWI": "",- "5qmtY1": "","puhcpn": "Lejki","08hqOd": "Ścieżki","nL6Jl0": "Retencja",diff --git a/client/messages/pt.json b/client/messages/pt.jsonindex 242e405e4..08600c4fc 100644--- a/client/messages/pt.json+++ b/client/messages/pt.json@@ -76,8 +76,6 @@"XHLYdJ": "Metas","9d/EEp": "Análise de Produto","5yUsUe": "Replay",- "mZDrWI": "",- "5qmtY1": "","puhcpn": "Funis","08hqOd": "Jornadas","nL6Jl0": "Retenção",diff --git a/client/messages/uk.json b/client/messages/uk.jsonindex c3b9a45f7..1b4423c60 100644--- a/client/messages/uk.json+++ b/client/messages/uk.json@@ -76,8 +76,6 @@"XHLYdJ": "Цілі","9d/EEp": "Продуктова аналітика","5yUsUe": "Відтворення",- "mZDrWI": "",- "5qmtY1": "","puhcpn": "Воронки","08hqOd": "Шляхи","nL6Jl0": "Утримання",diff --git a/client/messages/zh.json b/client/messages/zh.jsonindex 7c15104c0..136df25a0 100644--- a/client/messages/zh.json+++ b/client/messages/zh.json@@ -76,8 +76,6 @@"XHLYdJ": "目标","9d/EEp": "产品分析","5yUsUe": "会话回放",- "mZDrWI": "",- "5qmtY1": "","puhcpn": "漏斗","08hqOd": "旅程","nL6Jl0": "留存",diff --git a/client/src/app/[site]/main/components/sections/Events.tsx b/client/src/app/[site]/main/components/sections/Events.tsxindex 5f751b09a..db053cb60 100644--- a/client/src/app/[site]/main/components/sections/Events.tsx+++ b/client/src/app/[site]/main/components/sections/Events.tsx@@ -1,19 +1,16 @@import { useExtracted } from "next-intl";-import { useState } from "react";-import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../../../components/ui/basic-tabs";-import { Card, CardContent, CardLoader } from "../../../../../components/ui/card";-import { Button } from "../../../../../components/ui/button";import { useGetEventNames } from "../../../../../api/analytics/hooks/events/useGetEventNames";-import { EventList } from "../../../events/components/EventList";-import { OutboundLinksList } from "../../../events/components/OutboundLinksList";-import { OutboundLinksDialog } from "./OutboundLinksDialog";import { useGetOutboundLinks } from "../../../../../api/analytics/hooks/events/useGetOutboundLinks";-import { Expand } from "lucide-react";+import { CardLoader } from "../../../../../components/ui/card";import { ScrollArea } from "../../../../../components/ui/scroll-area";+import { EventList } from "../../../events/components/EventList";+import { OutboundLinksList } from "../../../events/components/OutboundLinksList";+import { TabbedSectionCard, type TabbedSectionItem } from "../../../components/shared/TabbedSectionCard";+import { OutboundLinksDialogBody } from "./OutboundLinksDialog";type Tab = "events" | "outbound";-function Events_() {+function EventsContent() {const { data: eventNamesData, isLoading: isLoadingEventNames } = useGetEventNames();const t = useExtracted();@@ -37,7 +34,7 @@ function Events_() {);}-function OutboundLinks({ expanded, close }: { expanded: boolean; close: () => void }) {+function OutboundLinksContent() {const { data: outboundLinksData, isLoading: isLoadingOutboundLinks } = useGetOutboundLinks();const t = useExtracted();@@ -54,42 +51,33 @@ function OutboundLinks({ expanded, close }: { expanded: boolean; close: () => vo<div>{t("Clicks")}</div></div><OutboundLinksList outboundLinks={outboundLinksData || []} isLoading={isLoadingOutboundLinks} />- <OutboundLinksDialog outboundLinks={outboundLinksData || []} expanded={expanded} close={close} /></div></>);}+function OutboundLinksDialogContent() {+ const { data: outboundLinksData } = useGetOutboundLinks();+ return <OutboundLinksDialogBody outboundLinks={outboundLinksData || []} />;+}+export function Events() {- const [tab, setTab] = useState<Tab>("events");- const [expandedOutbound, setExpandedOutbound] = useState(false);const t = useExtracted();- return (- <Card className="h-[483px]">- <CardContent className="mt-2">- <Tabs defaultValue="events" value={tab} onValueChange={value => setTab(value as Tab)}>- <div className="flex flex-row gap-2 justify-between items-center">- <div className="overflow-x-auto">- <TabsList>- <TabsTrigger value="events">{t("Custom Events")}</TabsTrigger>- <TabsTrigger value="outbound">{t("Outbound Links")}</TabsTrigger>- </TabsList>- </div>- {tab === "outbound" && (- <Button size="smIcon" onClick={() => setExpandedOutbound(true)}>- <Expand className="w-4 h-4" />- </Button>- )}- </div>- <TabsContent value="events">- <Events_ />- </TabsContent>- <TabsContent value="outbound">- <OutboundLinks expanded={expandedOutbound} close={() => setExpandedOutbound(false)} />- </TabsContent>- </Tabs>- </CardContent>- </Card>- );+ const tabs: TabbedSectionItem<Tab>[] = [+ {+ value: "events",+ label: t("Custom Events"),+ content: <EventsContent />,+ },+ {+ value: "outbound",+ label: t("Outbound Links"),+ content: <OutboundLinksContent />,+ dialogContent: <OutboundLinksDialogContent />,+ dialogTitle: t("Outbound Links"),+ },+ ];++ return <TabbedSectionCard defaultValue="events" tabs={tabs} className="h-[483px]" />;}diff --git a/client/src/app/[site]/main/components/sections/OutboundLinksDialog.tsx b/client/src/app/[site]/main/components/sections/OutboundLinksDialog.tsxindex 0ac3b7949..5aa55f15d 100644--- a/client/src/app/[site]/main/components/sections/OutboundLinksDialog.tsx+++ b/client/src/app/[site]/main/components/sections/OutboundLinksDialog.tsx@@ -1,11 +1,5 @@"use client";-import {- ResponsiveDialog,- ResponsiveDialogContent,- ResponsiveDialogHeader,- ResponsiveDialogTitle,-} from "@/components/ui/responsive-dialog";import { Input } from "@/components/ui/input";import { getTimezone } from "@/lib/store";import { useDebounce, useIntersectionObserver } from "@uidotdev/usehooks";@@ -17,10 +11,8 @@ import { useDateTimeFormat } from "../../../../../hooks/useDateTimeFormat";import { OutboundLink } from "../../../../../api/analytics/endpoints";import { cn } from "../../../../../lib/utils";-interface OutboundLinksDialogProps {+interface OutboundLinksDialogBodyProps {outboundLinks: OutboundLink[];- expanded: boolean;- close: () => void;}const INITIAL_ROWS = 100;@@ -28,7 +20,7 @@ const BATCH_SIZE = 100;type SortKey = "url" | "count" | "percentage" | "lastClicked";-export function OutboundLinksDialog({ outboundLinks, expanded, close }: OutboundLinksDialogProps) {+export function OutboundLinksDialogBody({ outboundLinks }: OutboundLinksDialogBodyProps) {const t = useExtracted();const { formatRelative } = useDateTimeFormat();const [searchTerm, setSearchTerm] = useState("");@@ -95,11 +87,7 @@ export function OutboundLinksDialog({ outboundLinks, expanded, close }: Outbound}return (- <ResponsiveDialog open={expanded} onOpenChange={close}>- <ResponsiveDialogContent className="max-w-[1000px] w-[calc(100vw-2rem)] p-2 sm:p-4 space-y-2">- <ResponsiveDialogHeader>- <ResponsiveDialogTitle>{t("Outbound Links")}</ResponsiveDialogTitle>- </ResponsiveDialogHeader>+ <div className="flex min-h-0 flex-1 flex-col gap-2"><div className="relative mb-2"><Search className="absolute left-2.5 top-2.5 h-4 w-4 text-neutral-600 dark:text-neutral-400" /><Input@@ -110,8 +98,8 @@ export function OutboundLinksDialog({ outboundLinks, expanded, close }: OutboundonChange={e => setSearchTerm(e.target.value)}/></div>- <div className="flex flex-col gap-2 overflow-x-auto">- <div className="max-h-[80vh] overflow-y-auto">+ <div className="flex min-h-0 flex-1 flex-col gap-2 overflow-x-auto">+ <div className="min-h-0 flex-1 overflow-y-auto"><table className="w-full text-xs text-left min-w-max"><thead className="bg-neutral-100 dark:bg-neutral-900 text-neutral-600 dark:text-neutral-400 sticky top-0 z-10"><tr>@@ -214,7 +202,6 @@ export function OutboundLinksDialog({ outboundLinks, expanded, close }: Outbound)}</div></div>- </ResponsiveDialogContent>- </ResponsiveDialog>+ </div>);}