From 6b498721544238dc285fb465cb43313bb8f9a861 Mon Sep 17 00:00:00 2001 From: Ramnique Singh <30795890+ramnique@users.noreply.github.com> Date: Wed, 13 Aug 2025 11:56:35 +0530 Subject: [PATCH] attempt to fix job-list reload bug --- .../job-rules/components/recurring-job-rule-view.tsx | 6 ++++-- .../app/projects/[projectId]/jobs/components/jobs-list.tsx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/rowboat/app/projects/[projectId]/job-rules/components/recurring-job-rule-view.tsx b/apps/rowboat/app/projects/[projectId]/job-rules/components/recurring-job-rule-view.tsx index f5eba5f4..18c672ff 100644 --- a/apps/rowboat/app/projects/[projectId]/job-rules/components/recurring-job-rule-view.tsx +++ b/apps/rowboat/app/projects/[projectId]/job-rules/components/recurring-job-rule-view.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useEffect, useState } from "react"; +import { useEffect, useMemo, useState } from "react"; import { useRouter } from "next/navigation"; import { Button } from "@/components/ui/button"; import { Panel } from "@/components/common/panel-common"; @@ -20,6 +20,8 @@ export function RecurringJobRuleView({ projectId, ruleId }: { projectId: string; const [deleting, setDeleting] = useState(false); const [showDeleteConfirm, setShowDeleteConfirm] = useState(false); + const jobsFilters = useMemo(() => ({ recurringJobRuleId: ruleId }), [ruleId]); + useEffect(() => { const loadRule = async () => { try { @@ -272,7 +274,7 @@ export function RecurringJobRuleView({ projectId, ruleId }: { projectId: string; diff --git a/apps/rowboat/app/projects/[projectId]/jobs/components/jobs-list.tsx b/apps/rowboat/app/projects/[projectId]/jobs/components/jobs-list.tsx index e1d174ac..8f478b99 100644 --- a/apps/rowboat/app/projects/[projectId]/jobs/components/jobs-list.tsx +++ b/apps/rowboat/app/projects/[projectId]/jobs/components/jobs-list.tsx @@ -50,7 +50,7 @@ export function JobsList({ projectId, filters, showTitle = true, customTitle }: setLoading(false); })(); return () => { ignore = true; }; - }, [fetchPage, filters]); + }, [fetchPage]); const loadMore = useCallback(async () => { if (!cursor) return;