Skip to content

Commit e0416f2

Browse files
authored
fix: correct text alignment and remove duplicate borders (#212)
* fix: web vitals empty state text alignment * fix: remove double borders in data table component
1 parent 428202c commit e0416f2

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

apps/dashboard/app/(main)/websites/[id]/vitals/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ export default function VitalsPage() {
245245
/>
246246
) : (
247247
<div className="rounded border bg-card p-8 text-center">
248-
<p className="text-muted-foreground text-sm">
248+
<p className="mx-auto text-muted-foreground text-sm">
249249
Click on a metric above to add it to the chart
250250
</p>
251251
</div>
@@ -260,7 +260,7 @@ export default function VitalsPage() {
260260
<h3 className="mt-4 font-medium text-foreground">
261261
No Web Vitals data yet
262262
</h3>
263-
<p className="mt-1 text-muted-foreground text-sm">
263+
<p className="mx-auto mt-1 text-muted-foreground text-sm">
264264
Web Vitals will appear here once your tracker starts collecting
265265
performance data from real users.
266266
</p>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ export function DataTable<TData extends { name: string | number }, TValue>({
177177
/>
178178
)}
179179

180-
<div className="overflow-hidden">
180+
{/* Remove borders to prevent double borders. Card already has borders on the left and bottom. */}
181+
<div className="overflow-hidden [&_tr:last-child]:border-b-0 [&_tr]:border-l-0">
181182
<TableContent
182183
activeTab={activeTab}
183184
emptyMessage={emptyMessage}

apps/dashboard/components/ui/table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {
3232
function TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {
3333
return (
3434
<tbody
35-
className={cn('[&_tr:last-child]:border-0', className)}
35+
className={className}
3636
data-slot="table-body"
3737
{...props}
3838
/>

0 commit comments

Comments
 (0)