Skip to content

Commit

Permalink
Convert Queued Tasks to TS
Browse files Browse the repository at this point in the history
(cherry picked from commit 6d552f2a60f44052079b5e8944f5e1bbabac56e0)
  • Loading branch information
markus101 authored and mynameisbogdan committed Mar 14, 2024
1 parent 30fd7c8 commit 218371a
Show file tree
Hide file tree
Showing 15 changed files with 381 additions and 460 deletions.
1 change: 0 additions & 1 deletion frontend/src/Commands/Command.ts
Expand Up @@ -12,7 +12,6 @@ export interface CommandBody {
lastStartTime: string;
trigger: string;
suppressMessages: boolean;
seriesId?: number;
}

interface Command extends ModelBase {
Expand Down
17 changes: 17 additions & 0 deletions frontend/src/Helpers/Hooks/useModalOpenState.ts
@@ -0,0 +1,17 @@
import { useCallback, useState } from 'react';

export default function useModalOpenState(
initialState: boolean
): [boolean, () => void, () => void] {
const [isOpen, setOpen] = useState(initialState);

const setModalOpen = useCallback(() => {
setOpen(true);
}, [setOpen]);

const setModalClosed = useCallback(() => {
setOpen(false);
}, [setOpen]);

return [isOpen, setModalOpen, setModalClosed];
}
9 changes: 0 additions & 9 deletions frontend/src/System/Tasks/Queued/QueuedTaskRow.css
Expand Up @@ -10,15 +10,6 @@
width: 100%;
}

.commandName {
display: inline-block;
min-width: 220px;
}

.userAgent {
color: #b0b0b0;
}

.queued,
.started,
.ended {
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/System/Tasks/Queued/QueuedTaskRow.css.d.ts
Expand Up @@ -2,14 +2,12 @@
// Please do not change this file!
interface CssExports {
'actions': string;
'commandName': string;
'duration': string;
'ended': string;
'queued': string;
'started': string;
'trigger': string;
'triggerContent': string;
'userAgent': string;
}
export const cssExports: CssExports;
export default cssExports;
279 changes: 0 additions & 279 deletions frontend/src/System/Tasks/Queued/QueuedTaskRow.js

This file was deleted.

0 comments on commit 218371a

Please sign in to comment.