Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Update Pages and RealtimePage components to truncate labels and adjust layout

Bill Yang0728b85cada5
diff --git a/client/src/app/[site]/main/components/sections/Pages.tsx b/client/src/app/[site]/main/components/sections/Pages.tsx
index 398ce0d76..b86b79efb 100644
--- a/client/src/app/[site]/main/components/sections/Pages.tsx
+++ b/client/src/app/[site]/main/components/sections/Pages.tsx
@@ -64,7 +64,7 @@ export function Pages() {
title="Entry Pages"
getValue={(e) => e.value}
getKey={(e) => e.value}
- getLabel={(e) => e.value || "Other"}
+ getLabel={(e) => truncateString(e.value, 30) || "Other"}
getLink={(e) => `https://${siteMetadata?.domain}${e.value}`}
expanded={expanded}
close={close}
@@ -76,7 +76,7 @@ export function Pages() {
title="Exit Pages"
getValue={(e) => e.value}
getKey={(e) => e.value}
- getLabel={(e) => e.value || "Other"}
+ getLabel={(e) => truncateString(e.value, 30) || "Other"}
getLink={(e) => `https://${siteMetadata?.domain}${e.value}`}
expanded={expanded}
close={close}
diff --git a/client/src/app/[site]/realtime/page.tsx b/client/src/app/[site]/realtime/page.tsx
index 35bd446fe..74db42d23 100644
--- a/client/src/app/[site]/realtime/page.tsx
+++ b/client/src/app/[site]/realtime/page.tsx
@@ -36,7 +36,7 @@ export default function RealtimePage() {
>
<World width={width ?? 0} />
- <div className="absolute top-2 left-2 md:top-4 md:left-4 flex flex-row gap-2">
+ <div className="absolute top-2 left-2 md:top-4 md:left-4 flex flex-row gap-2 items-start">
<MobileSidebar />
<div className="flex flex-col p-2 md:p-3 bg-neutral-900 rounded-lg shadow-lg border border-neutral-750 w-[300px] md:w-[400px]">
<div className="p-2">