mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 19:45:35 +01:00
Updated weekly session labels.
This commit is contained in:
parent
ffa954ee02
commit
7add059f43
2 changed files with 6 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { format } from 'date-fns';
|
||||
import { format, startOfDay, addHours } from 'date-fns';
|
||||
import { useLocale, useMessages, useWebsiteSessionsWeekly } from 'components/hooks';
|
||||
import { LoadingPanel } from 'components/common/LoadingPanel';
|
||||
import { getDayOfWeekAsDate } from 'lib/date';
|
||||
|
|
@ -40,9 +40,10 @@ export function SessionsWeekly({ websiteId }: { websiteId: string }) {
|
|||
{Array(24)
|
||||
.fill(null)
|
||||
.map((_, i) => {
|
||||
const label = format(addHours(startOfDay(new Date()), i), 'haaa');
|
||||
return (
|
||||
<div key={i} className={classNames(styles.cell, styles.hour)}>
|
||||
{i.toString().padStart(2, '0')}
|
||||
<div key={i} className={styles.hour}>
|
||||
{label}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue