Skip to content

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

Enhance NewFilterButton functionality and update skeleton styles

Bill Yangef75e2734f93
diff --git a/client/src/app/[site]/components/SubHeader/Filters/NewFilterButton.tsx b/client/src/app/[site]/components/SubHeader/Filters/NewFilterButton.tsx
index 471ae29e3..e7764d8d9 100644
--- a/client/src/app/[site]/components/SubHeader/Filters/NewFilterButton.tsx
+++ b/client/src/app/[site]/components/SubHeader/Filters/NewFilterButton.tsx
@@ -60,7 +60,12 @@ export function NewFilterButton() {
<Button
variant="default"
className="px-3"
- onClick={() => setOpen(true)}
+ onClick={() => {
+ if (localFilters.length === 0) {
+ addLocalFilter();
+ }
+ setOpen(true);
+ }}
>
<ListFilterPlus className="w-4 h-4" />
Filter
diff --git a/client/src/components/ui/skeleton.tsx b/client/src/components/ui/skeleton.tsx
index a8f51fff2..8e1592bc9 100644
--- a/client/src/components/ui/skeleton.tsx
+++ b/client/src/components/ui/skeleton.tsx
@@ -6,7 +6,7 @@ function Skeleton({
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<div
- className={cn("animate-pulse rounded-md bg-neutral-800", className)}
+ className={cn("animate-pulse rounded-md bg-neutral-850", className)}
{...props}
/>
);