mirror of
https://github.com/umami-software/umami.git
synced 2026-02-16 10:35:35 +01:00
fix WeeklyTraffic header clipping in board panels
Separate day name headers into their own grid row instead of embedding them inside the hourly data grid with marginBottom, which pushed the text outside the fixed 16px row height. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e2b391af28
commit
fee155c65b
1 changed files with 9 additions and 7 deletions
|
|
@ -39,8 +39,15 @@ export function WeeklyTraffic({ websiteId }: { websiteId: string }) {
|
||||||
<Grid columns="repeat(8, 1fr)" gap>
|
<Grid columns="repeat(8, 1fr)" gap>
|
||||||
{data && (
|
{data && (
|
||||||
<>
|
<>
|
||||||
<Grid rows="repeat(25, 16px)" gap="1">
|
<Row> </Row>
|
||||||
<Row> </Row>
|
{daysOfWeek.map((index: number) => (
|
||||||
|
<Row key={index} alignItems="center" justifyContent="center">
|
||||||
|
<Text weight="bold" align="center">
|
||||||
|
{format(getDayOfWeekAsDate(index), 'EEE', { locale: dateLocale })}
|
||||||
|
</Text>
|
||||||
|
</Row>
|
||||||
|
))}
|
||||||
|
<Grid rows="repeat(24, 16px)" gap="1">
|
||||||
{Array(24)
|
{Array(24)
|
||||||
.fill(null)
|
.fill(null)
|
||||||
.map((_, i) => {
|
.map((_, i) => {
|
||||||
|
|
@ -66,11 +73,6 @@ export function WeeklyTraffic({ websiteId }: { websiteId: string }) {
|
||||||
key={index}
|
key={index}
|
||||||
gap="1"
|
gap="1"
|
||||||
>
|
>
|
||||||
<Row alignItems="center" justifyContent="center" marginBottom="3">
|
|
||||||
<Text weight="bold" align="center">
|
|
||||||
{format(getDayOfWeekAsDate(index), 'EEE', { locale: dateLocale })}
|
|
||||||
</Text>
|
|
||||||
</Row>
|
|
||||||
{day?.map((count: number, j) => {
|
{day?.map((count: number, j) => {
|
||||||
const pct = max ? count / max : 0;
|
const pct = max ? count / max : 0;
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue