common component props

This commit is contained in:
2026-05-18 14:18:36 +05:30
parent 8bea3d06f6
commit ceaeca70cc
14 changed files with 191 additions and 259 deletions

View File

@@ -1,27 +1,19 @@
import * as React from "react";
import { ReportData, GroupKey } from "../../features/report";
import { ComponentProps } from "../report.props";
import { buildLatestItems } from "./LatestItems.adapter";
import LatestItemsView from "./LatestItems.view";
type Props = {
reportData: ReportData;
flow: "outflows" | "inflows";
header: string;
selectedPeriodId: string | null;
selectedGroupKey?: GroupKey | null;
accentColor: string;
isFetching?: boolean;
};
type Props = ComponentProps;
export default function LatestItems({
reportData,
flow,
state,
stateSetters,
header,
selectedPeriodId,
selectedGroupKey = null,
accentColor,
accentColor = "",
isFetching,
}: Props) {
const { flow, selectedPeriodId, selectedGroupKey } = state;
const [visibleCount, setVisibleCount] = React.useState(5);
const allItems = React.useMemo(() => {