File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
npm-packages/dashboard-common/src/features/schedules/components Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export function ScheduledFunctionsContent({
3030
3131 return (
3232 < div className = "relative flex h-full max-w-6xl grow flex-col gap-4" >
33- < ScheduledFunctionsContentToolbar jobs = { jobs } />
33+ < ScheduledFunctionsContentToolbar />
3434 < Sheet
3535 className = "flex min-w-[40rem] max-w-full grow flex-col"
3636 padding = { false }
Original file line number Diff line number Diff line change 11import { TrashIcon } from "@radix-ui/react-icons" ;
22import { useRouter } from "next/router" ;
33import { useContext , useState } from "react" ;
4- import { ScheduledJob } from "system-udfs/convex/_system/frontend/common" ;
54import { useCancelAllJobs } from "@common/features/schedules/lib/api" ;
65import { DeploymentInfoContext } from "@common/lib/deploymentContext" ;
76import {
@@ -20,11 +19,7 @@ import { Button } from "@common/elements/Button";
2019import { SchedulerStatus } from "@common/elements/SchedulerStatus" ;
2120import { ConfirmationDialog } from "@common/elements/ConfirmationDialog" ;
2221
23- export function ScheduledFunctionsContentToolbar ( {
24- jobs,
25- } : {
26- jobs : ScheduledJob [ ] ;
27- } ) {
22+ export function ScheduledFunctionsContentToolbar ( ) {
2823 const currentOpenFunction = useCurrentOpenFunction ( ) ;
2924 const moduleFunctions = useModuleFunctions ( ) ;
3025 const router = useRouter ( ) ;
@@ -94,7 +89,7 @@ export function ScheduledFunctionsContentToolbar({
9489 size = "sm"
9590 onClick = { ( ) => setShowDeleteModal ( true ) }
9691 icon = { < TrashIcon /> }
97- disabled = { jobs . length === 0 || ! canCancelJobs }
92+ disabled = { ! canCancelJobs }
9893 tip = {
9994 ! canCancelJobs &&
10095 "You do not have permission to cancel scheduled runs in production."
You can’t perform that action at this time.
0 commit comments