From 932bf87640cd9fc0007da6896ebd103f50196aee Mon Sep 17 00:00:00 2001 From: Guillaume Date: Mon, 22 Apr 2024 11:42:55 -0400 Subject: [PATCH] chore: formatting --- src/renderer/hooks/useTestSequencerProject.ts | 12 +++++++----- .../test_sequencer_panel/components/DesignBar.tsx | 14 ++++++++------ .../components/modals/SequencerGalleryModal.tsx | 1 - 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/renderer/hooks/useTestSequencerProject.ts b/src/renderer/hooks/useTestSequencerProject.ts index 3bb67d239..ed2b08236 100644 --- a/src/renderer/hooks/useTestSequencerProject.ts +++ b/src/renderer/hooks/useTestSequencerProject.ts @@ -122,11 +122,15 @@ export const useImportAllSequencesInFolder = () => { const manager = usePrepareStateManager(); const { isAdmin } = useWithPermission(); - const handleImport = async (path: string, relative: boolean=false) => { + const handleImport = async (path: string, relative: boolean = false) => { async function importSequences(): Promise> { // Confirmation if admin if (!isAdmin()) { - return err(Error("Admin only, Connect to Flojoy Cloud and select a Test Profile")); + return err( + Error( + "Admin only, Connect to Flojoy Cloud and select a Test Profile", + ), + ); } // Find .tjoy files from the profile @@ -136,9 +140,7 @@ export const useImportAllSequencesInFolder = () => { relative, ); if (result === undefined) { - return err( - Error(`Failed to find the directory ${path}`), - ); + return err(Error(`Failed to find the directory ${path}`)); } if (!result || result.length === 0) { return err(Error("No .tjoy file found in the selected directory")); diff --git a/src/renderer/routes/test_sequencer_panel/components/DesignBar.tsx b/src/renderer/routes/test_sequencer_panel/components/DesignBar.tsx index 9fdb6c6a0..0ec7f7020 100644 --- a/src/renderer/routes/test_sequencer_panel/components/DesignBar.tsx +++ b/src/renderer/routes/test_sequencer_panel/components/DesignBar.tsx @@ -120,10 +120,12 @@ export function DesignBar() { onClick={() => setIsGalleryOpen(true)} data-testid="app-gallery-btn" > - + Import Example - 0 ? cycleRuns - .map((el) => getGlobalStatus([], el, [])) - .reduce((prev, curr) => - priority[prev] > priority[curr] ? prev : curr, - ) + .map((el) => getGlobalStatus([], el, [])) + .reduce((prev, curr) => + priority[prev] > priority[curr] ? prev : curr, + ) : "pending"; if (sequences.length === 0 && data.length === 0) return highestCycle; diff --git a/src/renderer/routes/test_sequencer_panel/components/modals/SequencerGalleryModal.tsx b/src/renderer/routes/test_sequencer_panel/components/modals/SequencerGalleryModal.tsx index 8e054ed7a..7871c47e5 100644 --- a/src/renderer/routes/test_sequencer_panel/components/modals/SequencerGalleryModal.tsx +++ b/src/renderer/routes/test_sequencer_panel/components/modals/SequencerGalleryModal.tsx @@ -20,7 +20,6 @@ export const SequencerGalleryModal = ({ isGalleryOpen, setIsGalleryOpen, }: AppGalleryModalProps) => { - const importSequence = useImportAllSequencesInFolder(); const handleSequenceLoad = (relativePath: string) => {