Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliu-dev committed Jan 24, 2025
1 parent bddb1e0 commit 3af7806
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function CustomTab(props: { index: number; children: string }) {
[css.activeTab]: isActive,
[css.isCompleted]: isCompleted,
})}
disabled={getDisabled(props.children,state)}
disabled={getDisabled(props.children, state)}
>
{isCompleted && <FiCheck className={css.check} />}
<span>{props.children}</span>
Expand All @@ -86,13 +86,16 @@ function getCompleted(tabName: string, state: ConfigState): boolean {
}
}

function getDisabled(tabName: string, state: ConfigState):boolean{
function getDisabled(tabName: string, state: ConfigState): boolean {
switch (tabName) {
case "Connection":
return !state.name;
case "Advanced":
return !state.name||(!state.connectionUrl && (!state.host || !state.username));
return (
!state.name ||
(!state.connectionUrl && (!state.host || !state.username))
);
default:
return false;
}
}
}

0 comments on commit 3af7806

Please sign in to comment.