Skip to content

Commit

Permalink
TASK: Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebobo committed Sep 17, 2024
1 parent af027e4 commit 6e97394
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,7 @@ const CommandBarDialog: React.FC<CommandBarDialogProps> = ({ onDrag, open, toggl
>
<CommandBarExecutor toggleOpen={toggleOpen} dialogRef={dialogRef} open={open}>
<CommandBarHeader />
<div
className={classnames(
styles.resultsWrap,
expanded.value && styles.expanded,
)}
>
<div className={classnames(styles.resultsWrap, expanded.value && styles.expanded)}>
{expanded.value && !result.value && <CommandList />}
{result.value && <CommandResultsView />}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@ const CommandBarFooter: React.FC = () => {
commands,
result,
selectedCommandGroup,
expanded
expanded,
},
Icon
Icon,
} = useCommandBarState();

const commandForContext = useComputed<Command>(() => {
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;
Expand All @@ -43,7 +41,8 @@ const CommandBarFooter: React.FC = () => {
<IconSpinner />
</IconWrapper>
<em>
{commandForContext.value.name}{activeCommandMessage.value ? '﹘' + activeCommandMessage.value : ''}
{commandForContext.value.name}
{activeCommandMessage.value ? '﹘' + activeCommandMessage.value : ''}
</em>
</span>
) : commandForContext.value ? (
Expand Down

0 comments on commit 6e97394

Please sign in to comment.