feat: update existing intergrations

This commit is contained in:
Nevo David 2025-06-28 19:08:02 +07:00
parent 33e636aa21
commit 2b1020c528
1 changed files with 19 additions and 10 deletions

View File

@ -12,15 +12,19 @@ export const PicksSocialsComponent: FC<{ toolTip?: boolean }> = ({
}) => {
const exising = useExistingData();
const { locked, addOrRemoveSelectedIntegration, integrations, selectedIntegrations } =
useLaunchStore(
useShallow((state) => ({
integrations: state.integrations,
selectedIntegrations: state.selectedIntegrations,
addOrRemoveSelectedIntegration: state.addOrRemoveSelectedIntegration,
locked: state.locked,
}))
);
const {
locked,
addOrRemoveSelectedIntegration,
integrations,
selectedIntegrations,
} = useLaunchStore(
useShallow((state) => ({
integrations: state.integrations,
selectedIntegrations: state.selectedIntegrations,
addOrRemoveSelectedIntegration: state.addOrRemoveSelectedIntegration,
locked: state.locked,
}))
);
return (
<div className={clsx('flex', locked && 'opacity-50 pointer-events-none')}>
@ -28,7 +32,12 @@ export const PicksSocialsComponent: FC<{ toolTip?: boolean }> = ({
<div className="innerComponent">
<div className="grid grid-cols-13 gap-[10px]">
{integrations
.filter((f) => !f.inBetweenSteps && !f.disabled)
.filter((f) => {
if (exising.integration) {
return f.id === exising.integration;
}
return !f.inBetweenSteps && !f.disabled;
})
.map((integration) => (
<div
key={integration.id}