Skip to content

Commit

Permalink
Update executeJobModal.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
and189 authored Nov 29, 2023
1 parent b484f78 commit 151247e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/client/src/app/jobs/executeJobModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ export const ExecuteJobModal: React.FC<ExecuteJobModalProps> = ({ closeModal, de
const [search, setSearch] = useState('');

const filteredDevices = useMemo(() => {
return devices?.filter((device) =>
device.deviceId?.includes(search) || device.origin?.includes(search)
) || [];
return devices?.filter((device) => device.deviceId?.includes(search) || device.origin?.includes(search)) || [];
}, [devices, search]);


const executeJob = async ({ deviceIds }: { deviceIds: string[] | number[] }) => {
const promise = fetch(`/api/job/execute/${jobId}/${deviceIds.join()}`, { method: 'POST' }).then(
async (response) => {
Expand Down

0 comments on commit 151247e

Please sign in to comment.