mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
Add breadcrumb.
This commit is contained in:
parent
c807c3a8e9
commit
fa2cc5dbbd
8 changed files with 123 additions and 28 deletions
|
|
@ -4,6 +4,7 @@ import { useMessages, useApi, useNavigation, useTeamUrl } from 'components/hooks
|
|||
import { ReportContext } from './Report';
|
||||
import styles from './ReportHeader.module.css';
|
||||
import { REPORT_TYPES } from 'lib/constants';
|
||||
import Breadcrumb from 'components/common/Breadcrumb';
|
||||
|
||||
export function ReportHeader({ icon }) {
|
||||
const { report, updateReport } = useContext(ReportContext);
|
||||
|
|
@ -57,9 +58,16 @@ export function ReportHeader({ icon }) {
|
|||
<div className={styles.header}>
|
||||
<div>
|
||||
<div className={styles.type}>
|
||||
{formatMessage(
|
||||
labels[Object.keys(REPORT_TYPES).find(key => REPORT_TYPES[key] === report?.type)],
|
||||
)}
|
||||
<Breadcrumb
|
||||
data={[
|
||||
{ label: formatMessage(labels.reports), url: '/reports' },
|
||||
{
|
||||
label: formatMessage(
|
||||
labels[Object.keys(REPORT_TYPES).find(key => REPORT_TYPES[key] === report?.type)],
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<div className={styles.title}>
|
||||
<Icon size="lg">{icon}</Icon>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue