Skip to content

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

Fix funnels

Bill Yangad4c63c32eeb
diff --git a/client/src/app/[site]/funnels/components/Funnel.tsx b/client/src/app/[site]/funnels/components/Funnel.tsx
index 1e0bbeae9..a753aa8fb 100644
--- a/client/src/app/[site]/funnels/components/Funnel.tsx
+++ b/client/src/app/[site]/funnels/components/Funnel.tsx
@@ -66,7 +66,7 @@ export function Funnel({ data, steps, isError, error, isPending }: FunnelProps)
{step.stepNumber}
</div>
<div className="font-medium text-sm flex items-center gap-2">
- {steps[index].type === "page" ? <PageviewIcon /> : <EventIcon />}
+ {steps[index]?.type === "page" ? <PageviewIcon /> : <EventIcon />}
{step.stepName}
</div>
</div>
diff --git a/client/src/app/[site]/funnels/page.tsx b/client/src/app/[site]/funnels/page.tsx
index e80d8579f..f38c0fbdd 100644
--- a/client/src/app/[site]/funnels/page.tsx
+++ b/client/src/app/[site]/funnels/page.tsx
@@ -88,22 +88,6 @@ export default function FunnelsPage() {
});
}, [funnels, searchQuery]);
- if (isLoading) {
- return (
- <div className="p-4 max-w-[1300px] mx-auto space-y-4">
- <div className="flex justify-between items-center mb-3">
- <div>
- <MobileSidebar />
- </div>
- <Skeleton className="h-10 w-32" />
- </div>
- {[1, 2, 3].map(i => (
- <FunnelRowSkeleton key={i} />
- ))}
- </div>
- );
- }
-
return (
<DisabledOverlay message="Funnels" featurePath="funnels">
<div className="p-2 md:p-4 max-w-[1300px] mx-auto space-y-3">
@@ -119,7 +103,13 @@ export default function FunnelsPage() {
<CreateFunnelDialog />
</div>
- {error ? (
+ {isLoading || !funnels ? (
+ <div className="space-y-4">
+ {[1, 2, 3].map(i => (
+ <FunnelRowSkeleton key={i} />
+ ))}
+ </div>
+ ) : error ? (
<div className="p-4 bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 rounded-lg">
Failed to load funnels: {error instanceof Error ? error.message : "Unknown error"}
</div>
diff --git a/client/src/app/admin/components/organizations/Organizations.tsx b/client/src/app/admin/components/organizations/Organizations.tsx
index d702d8c5b..55c8b06d1 100644
--- a/client/src/app/admin/components/organizations/Organizations.tsx
+++ b/client/src/app/admin/components/organizations/Organizations.tsx
@@ -71,8 +71,8 @@ export function Organizations() {
const end = now.toFormat("yyyy-MM-dd");
if (timePeriod === "all") {
- // For all time, use a date far in the past (e.g., 5 years ago)
- const start = now.minus({ years: 5 }).toFormat("yyyy-MM-dd");
+ // For all time, start from May 2025
+ const start = "2025-05-01";
return { startDate: start, endDate: end };
}