Skip to content

Commit ffa303c

Browse files
committed
fix: padding to loading
1 parent 9f880f4 commit ffa303c

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

apps/dashboard/app/(main)/websites/[id]/_components/utils/ui-components.tsx

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,17 @@ export const BORDER_RADIUS = {
1919
};
2020

2121
interface MetricToggleProps {
22-
id: string;
2322
label: string;
2423
checked: boolean;
2524
onChange: () => void;
2625
color: string;
27-
description?: string;
2826
}
2927

3028
export const MetricToggle: React.FC<MetricToggleProps> = ({
31-
id,
3229
label,
3330
checked,
3431
onChange,
3532
color,
36-
description,
3733
}) => {
3834
// Get proper hex values for the colors
3935
const getColorMap = (colorName: string) => {
@@ -105,40 +101,22 @@ interface MetricTogglesProps {
105101
onToggle: (metric: string) => void;
106102
colors: Record<string, string>;
107103
labels?: Record<string, string>;
108-
descriptions?: Record<string, string>;
109104
}
110105

111106
export const MetricToggles: React.FC<MetricTogglesProps> = ({
112107
metrics,
113108
onToggle,
114109
colors,
115110
labels = {},
116-
descriptions = {},
117111
}) => {
118-
const metricDescriptions = {
119-
pageviews: 'Total number of pages viewed by visitors',
120-
visitors: 'Number of unique users visiting your website',
121-
sessions: 'A group of interactions within a time frame',
122-
bounce_rate: 'Percentage of single-page sessions',
123-
avg_session_duration: 'Average time spent during a session',
124-
...descriptions,
125-
};
126-
127112
return (
128113
<div className="flex flex-wrap items-center gap-2">
129114
{Object.keys(metrics).map((metric) => (
130115
<MetricToggle
131116
checked={metrics[metric]}
132117
color={colors[metric] || 'blue-500'}
133-
description={
134-
metricDescriptions[metric as keyof typeof metricDescriptions]
135-
}
136-
id={`metric-${metric}`}
137118
key={metric}
138-
label={
139-
labels[metric] ||
140-
metric.charAt(0).toUpperCase() + metric.slice(1).replace(/_/g, ' ')
141-
}
119+
label={labels[metric] || metric}
142120
onChange={() => onToggle(metric)}
143121
/>
144122
))}

apps/dashboard/components/analytics/data-table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ export function DataTable<TData extends { name: string | number }, TValue>({
751751
className
752752
)}
753753
>
754-
<div className="px-2 pb-2 sm:px-3">
754+
<div className="p-4 px-2 pb-2 sm:px-3">
755755
<div className="flex flex-col items-start justify-between gap-3 sm:flex-row">
756756
<div className="min-w-0 flex-1">
757757
<Skeleton className="h-5 w-32 rounded-md" />

0 commit comments

Comments
 (0)