Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Add hook useTimeperiod in component Graph (#9773)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan91 authored and Thebarda committed Jun 2, 2021
1 parent bd8d591 commit 6bb2372
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion www/front_src/src/Resources/Listing/columns/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import useMousePosition, {
} from '../../Graph/Performance/ExportableGraphWithTimeline/useMousePosition';
import { ResourceDetails } from '../../Details/models';
import { Resource } from '../../models';
import useTimePeriod from '../../Graph/Performance/TimePeriods/useTimePeriod';

import HoverChip from './HoverChip';
import IconColumn from './IconColumn';
Expand All @@ -33,14 +34,15 @@ interface GraphProps {
}

const Graph = ({ row, endpoint }: GraphProps): JSX.Element => {
const { periodQueryParameters } = useTimePeriod({});
const mousePositionProps = useMousePosition();

return (
<MousePositionContext.Provider value={mousePositionProps}>
<PerformanceGraph
limitLegendRows
displayTitle={false}
endpoint={endpoint}
endpoint={`${endpoint}${periodQueryParameters}`}
graphHeight={150}
resource={row}
timeline={[]}
Expand Down

0 comments on commit 6bb2372

Please sign in to comment.