Add type to memoized grouped workflows

MAILPOET-4532
This commit is contained in:
John Oleksowicz
2022-09-06 14:40:14 -05:00
committed by Jan Jakeš
parent 3a342b0311
commit d4fe5dd3d9

View File

@@ -38,7 +38,7 @@ export function AutomationListing({ workflows, loading }: Props): JSX.Element {
[pageSearch, history],
);
const groupedWorkflows = useMemo(() => {
const groupedWorkflows = useMemo<Record<string, Workflow[]>>(() => {
const grouped = {};
workflows.forEach((workflow) => {
if (!grouped[workflow.status]) {