feat: update existing intergrations
This commit is contained in:
parent
33e636aa21
commit
2b1020c528
|
|
@ -12,15 +12,19 @@ export const PicksSocialsComponent: FC<{ toolTip?: boolean }> = ({
|
||||||
}) => {
|
}) => {
|
||||||
const exising = useExistingData();
|
const exising = useExistingData();
|
||||||
|
|
||||||
const { locked, addOrRemoveSelectedIntegration, integrations, selectedIntegrations } =
|
const {
|
||||||
useLaunchStore(
|
locked,
|
||||||
useShallow((state) => ({
|
addOrRemoveSelectedIntegration,
|
||||||
integrations: state.integrations,
|
integrations,
|
||||||
selectedIntegrations: state.selectedIntegrations,
|
selectedIntegrations,
|
||||||
addOrRemoveSelectedIntegration: state.addOrRemoveSelectedIntegration,
|
} = useLaunchStore(
|
||||||
locked: state.locked,
|
useShallow((state) => ({
|
||||||
}))
|
integrations: state.integrations,
|
||||||
);
|
selectedIntegrations: state.selectedIntegrations,
|
||||||
|
addOrRemoveSelectedIntegration: state.addOrRemoveSelectedIntegration,
|
||||||
|
locked: state.locked,
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={clsx('flex', locked && 'opacity-50 pointer-events-none')}>
|
<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="innerComponent">
|
||||||
<div className="grid grid-cols-13 gap-[10px]">
|
<div className="grid grid-cols-13 gap-[10px]">
|
||||||
{integrations
|
{integrations
|
||||||
.filter((f) => !f.inBetweenSteps && !f.disabled)
|
.filter((f) => {
|
||||||
|
if (exising.integration) {
|
||||||
|
return f.id === exising.integration;
|
||||||
|
}
|
||||||
|
return !f.inBetweenSteps && !f.disabled;
|
||||||
|
})
|
||||||
.map((integration) => (
|
.map((integration) => (
|
||||||
<div
|
<div
|
||||||
key={integration.id}
|
key={integration.id}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue