Skip to content

Commit 82d5ae7

Browse files
committed
left over clean up
1 parent bf77a01 commit 82d5ae7

1 file changed

Lines changed: 8 additions & 15 deletions

File tree

client/src/features/connectedServices/ConnectedServicesPage.tsx

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -407,17 +407,10 @@ function ConnectedServiceListItem({
407407
)}
408408
>
409409
<p className="mb-0">
410-
{actionRequired && connection?.status === "pending" ? (
411-
<>
412-
Action required. Please connect to this integration{" "}
413-
{source && <>and then {goBackButton}</>}.
414-
</>
415-
) : (
416-
<>
417-
Check your integration settings here.{" "}
418-
{goBackButton && <>You can later {goBackButton}.</>}
419-
</>
420-
)}
410+
{actionRequired && connection?.status === "pending"
411+
? "Action required. Please connect to this integration "
412+
: "Check your integration settings here."}
413+
{goBackButton && <>and then {goBackButton}</>}
421414
</p>
422415
</RenkuAlert>
423416
)}
@@ -470,15 +463,15 @@ function AddIntegrationModal({
470463
return providers.slice(0, DEFAULT_MODAL_PROVIDERS_COUNT);
471464
}, [isListExpanded, providers]);
472465

473-
const handleClosed = useCallback(() => {
474-
setShowAllIntegrations(false);
466+
const toggleShowAllIntegrations = useCallback(() => {
467+
setShowAllIntegrations((open) => !open);
475468
}, []);
476469

477470
return (
478471
<Modal
479472
centered
480473
isOpen={isOpen}
481-
onClosed={handleClosed}
474+
onClosed={toggleShowAllIntegrations}
482475
size="lg"
483476
toggle={onToggle}
484477
>
@@ -522,7 +515,7 @@ function AddIntegrationModal({
522515
))}
523516
{providers.length > DEFAULT_MODAL_PROVIDERS_COUNT && (
524517
<button
525-
onClick={() => setShowAllIntegrations(!showAllIntegrations)}
518+
onClick={toggleShowAllIntegrations}
526519
className={cx(
527520
"text-primary",
528521
"list-group-item",

0 commit comments

Comments
 (0)