mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 03:25:40 +01:00
Renamed (app) folder to (main).
This commit is contained in:
parent
5c15778c9b
commit
c990459238
167 changed files with 48 additions and 114 deletions
20
src/app/(main)/reports/Report.js
Normal file
20
src/app/(main)/reports/Report.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
'use client';
|
||||
import { createContext } from 'react';
|
||||
import { useReport } from 'components/hooks';
|
||||
import styles from './Report.module.css';
|
||||
|
||||
export const ReportContext = createContext(null);
|
||||
|
||||
export function Report({ reportId, defaultParameters, children, ...props }) {
|
||||
const report = useReport(reportId, defaultParameters);
|
||||
|
||||
return (
|
||||
<ReportContext.Provider value={{ ...report }}>
|
||||
<div {...props} className={styles.container}>
|
||||
{children}
|
||||
</div>
|
||||
</ReportContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
export default Report;
|
||||
Loading…
Add table
Add a link
Reference in a new issue