Skip to content

Commit

Permalink
pagination data
Browse files Browse the repository at this point in the history
  • Loading branch information
MVarshini committed Oct 15, 2024
1 parent 659d820 commit e25b82e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 6 additions & 4 deletions frontend/src/components/templates/ILab/IlabCompareComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ import { handleMultiGraph } from "@/actions/ilabActions.js";
import { uid } from "@/utils/helper";
import { useState } from "react";

const IlabCompareComponent = (props) => {
const { data } = props;
const { page, perPage, totalItems } = useSelector((state) => state.ilab);
const IlabCompareComponent = () => {
// const { data } = props;
const { page, perPage, totalItems, tableData } = useSelector(
(state) => state.ilab
);
const dispatch = useDispatch();
const [selectedItems, setSelectedItems] = useState([]);
const { multiGraphData } = useSelector((state) => state.ilab);
Expand Down Expand Up @@ -55,7 +57,7 @@ const IlabCompareComponent = (props) => {
<Menu onSelect={onSelect} selected={selectedItems}>
<MenuContent>
<MenuList>
{data.map((item) => {
{tableData.map((item) => {
return (
<MenuItem
key={uid()}
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/templates/ILab/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const ILab = () => {
const [searchParams] = useSearchParams();

const {
results,
start_date,
end_date,
comparisonSwitch,
Expand Down Expand Up @@ -118,7 +117,7 @@ const ILab = () => {
onSwitchChange={onSwitchChange}
/>
{comparisonSwitch ? (
<IlabCompareComponent data={results} />
<IlabCompareComponent />
) : (
<>
<Table aria-label="Misc table" isStriped variant="compact">
Expand Down

0 comments on commit e25b82e

Please sign in to comment.