From 6e9739448d9733c7e3818c428abfe99536052668 Mon Sep 17 00:00:00 2001 From: Sebastian Helzle Date: Tue, 17 Sep 2024 10:38:13 +0200 Subject: [PATCH] TASK: Fix linter warnings --- .../components/CommandBarDialog/CommandBarDialog.tsx | 7 +------ .../components/CommandBarFooter/CommandBarFooter.tsx | 11 +++++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.tsx b/packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.tsx index 5ec7e25..4914791 100644 --- a/packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.tsx +++ b/packages/commandbar/src/components/CommandBarDialog/CommandBarDialog.tsx @@ -124,12 +124,7 @@ const CommandBarDialog: React.FC = ({ onDrag, open, toggl > -
+
{expanded.value && !result.value && } {result.value && }
diff --git a/packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.tsx b/packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.tsx index f58f5c8..a3ba2a3 100644 --- a/packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.tsx +++ b/packages/commandbar/src/components/CommandBarFooter/CommandBarFooter.tsx @@ -17,18 +17,16 @@ const CommandBarFooter: React.FC = () => { commands, result, selectedCommandGroup, - expanded + expanded, }, - Icon + Icon, } = useCommandBarState(); const commandForContext = useComputed(() => { const commandId = activeCommandId.value ?? resultCommandId.value; if (!commandId) return null; // FIXME: This will not be correct when a command and an option in the result have the same id - return commandId - ? commands.value[commandId] ?? result.value.options[commandId] - : null; + return commandId ? commands.value[commandId] ?? result.value.options[commandId] : null; }); const isRunning = activeCommandId.value !== null; @@ -43,7 +41,8 @@ const CommandBarFooter: React.FC = () => { - {commandForContext.value.name}{activeCommandMessage.value ? '﹘' + activeCommandMessage.value : ''} + {commandForContext.value.name} + {activeCommandMessage.value ? '﹘' + activeCommandMessage.value : ''} ) : commandForContext.value ? (