feat: fix internal channels
This commit is contained in:
parent
494df9c3db
commit
38f31f3a83
|
|
@ -40,12 +40,9 @@ export const AddEditModal: FC<AddEditModalProps> = (props) => {
|
|||
);
|
||||
|
||||
const integrations = useLaunchStore((state) => state.integrations);
|
||||
|
||||
useEffect(() => {
|
||||
setDate(props.date || dayjs());
|
||||
setAllIntegrations(
|
||||
(props.integrations || []).filter((f) => !f.inBetweenSteps && !f.disabled)
|
||||
);
|
||||
setAllIntegrations(props.allIntegrations || []);
|
||||
setIsCreateSet(!!props.addEditSets);
|
||||
}, []);
|
||||
|
||||
|
|
|
|||
|
|
@ -455,10 +455,10 @@ export const Editor: FC<{
|
|||
<div
|
||||
className={clsx(
|
||||
'text-end text-sm mt-1',
|
||||
props.value.length > props.totalChars && '!text-red-500'
|
||||
props?.value?.length > props.totalChars && '!text-red-500'
|
||||
)}
|
||||
>
|
||||
{props.value.length}/{props.totalChars}
|
||||
{props?.value?.length}/{props.totalChars}
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export const PicksSocialsComponent: FC<{ toolTip?: boolean }> = ({
|
|||
<div className="innerComponent">
|
||||
<div className="grid grid-cols-13 gap-[10px]">
|
||||
{integrations
|
||||
.filter((f) => !f.inBetweenSteps)
|
||||
.filter((f) => !f.inBetweenSteps && !f.disabled)
|
||||
.map((integration) => (
|
||||
<div
|
||||
key={integration.id}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ export const withProvider = function <T extends object>(
|
|||
setTab,
|
||||
setTotalChars,
|
||||
justCurrent,
|
||||
allIntegrations,
|
||||
} = useLaunchStore(
|
||||
useShallow((state) => ({
|
||||
date: state.date,
|
||||
|
|
@ -70,6 +71,7 @@ export const withProvider = function <T extends object>(
|
|||
global: state.global,
|
||||
internal: state.internal.find((p) => p.integration.id === props.id),
|
||||
integrations: state.selectedIntegrations,
|
||||
allIntegrations: state.integrations,
|
||||
justCurrent: state.current,
|
||||
current: state.current === props.id,
|
||||
isGlobal: state.current === 'global',
|
||||
|
|
@ -195,7 +197,7 @@ export const withProvider = function <T extends object>(
|
|||
value={{
|
||||
date,
|
||||
integration: selectedIntegration.integration,
|
||||
allIntegrations: integrations.map((p) => p.integration),
|
||||
allIntegrations,
|
||||
value: value.map((p) => ({
|
||||
id: p.id,
|
||||
content: p.content,
|
||||
|
|
|
|||
Loading…
Reference in New Issue