update dashboard metrics and move away from round corners

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-05-20 21:22:20 +02:00
parent 4350670bbc
commit 3ecdf54d5c
13 changed files with 125 additions and 137 deletions

View File

@@ -12,7 +12,7 @@ export function StickyBelowHeader({
return (
<div
className={cn(
'top-0 z-20 rounded-lg border-b border-border bg-background md:sticky [[id=dashboard]_&]:top-16 [[id=dashboard]_&]:rounded-none',
'top-0 z-20 border-b border-border bg-background md:sticky [[id=dashboard]_&]:top-16 [[id=dashboard]_&]:rounded-none',
className
)}
>

View File

@@ -41,9 +41,6 @@ export default function Page({
<OverviewFiltersButtons />
</StickyBelowHeader>
<div className="grid grid-cols-6 gap-4 p-4">
<div className="col-span-6">
<OverviewLiveHistogram projectId={projectId} />
</div>
<OverviewMetrics projectId={projectId} />
<OverviewTopSources projectId={projectId} />
<OverviewTopPages projectId={projectId} />

View File

@@ -14,6 +14,7 @@ import {
eachDayOfInterval,
endOfMonth,
format,
formatISO,
startOfMonth,
subMonths,
} from 'date-fns';
@@ -60,7 +61,9 @@ const ProfileActivity = ({ data }: Props) => {
end: endOfMonth(subMonths(startDate, 1)),
}).map((date) => {
const hit = data.find((item) =>
item.date.includes(date.toISOString().split('T')[0])
item.date.includes(
formatISO(date, { representation: 'date' })
)
);
return (
<div
@@ -82,7 +85,9 @@ const ProfileActivity = ({ data }: Props) => {
end: endDate,
}).map((date) => {
const hit = data.find((item) =>
item.date.includes(date.toISOString().split('T')[0])
item.date.includes(
formatISO(date, { representation: 'date' })
)
);
return (
<div