Skip to content

Commit 38f31f3

Browse files
committed
feat: fix internal channels
1 parent 494df9c commit 38f31f3

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

apps/frontend/src/components/new-launch/add.edit.modal.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,9 @@ export const AddEditModal: FC<AddEditModalProps> = (props) => {
4040
);
4141

4242
const integrations = useLaunchStore((state) => state.integrations);
43-
4443
useEffect(() => {
4544
setDate(props.date || dayjs());
46-
setAllIntegrations(
47-
(props.integrations || []).filter((f) => !f.inBetweenSteps && !f.disabled)
48-
);
45+
setAllIntegrations(props.allIntegrations || []);
4946
setIsCreateSet(!!props.addEditSets);
5047
}, []);
5148

apps/frontend/src/components/new-launch/editor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,10 +455,10 @@ export const Editor: FC<{
455455
<div
456456
className={clsx(
457457
'text-end text-sm mt-1',
458-
props.value.length > props.totalChars && '!text-red-500'
458+
props?.value?.length > props.totalChars && '!text-red-500'
459459
)}
460460
>
461-
{props.value.length}/{props.totalChars}
461+
{props?.value?.length}/{props.totalChars}
462462
</div>
463463
)}
464464
</>

apps/frontend/src/components/new-launch/picks.socials.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const PicksSocialsComponent: FC<{ toolTip?: boolean }> = ({
2828
<div className="innerComponent">
2929
<div className="grid grid-cols-13 gap-[10px]">
3030
{integrations
31-
.filter((f) => !f.inBetweenSteps)
31+
.filter((f) => !f.inBetweenSteps && !f.disabled)
3232
.map((integration) => (
3333
<div
3434
key={integration.id}

apps/frontend/src/components/new-launch/providers/high.order.provider.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export const withProvider = function <T extends object>(
6262
setTab,
6363
setTotalChars,
6464
justCurrent,
65+
allIntegrations,
6566
} = useLaunchStore(
6667
useShallow((state) => ({
6768
date: state.date,
@@ -70,6 +71,7 @@ export const withProvider = function <T extends object>(
7071
global: state.global,
7172
internal: state.internal.find((p) => p.integration.id === props.id),
7273
integrations: state.selectedIntegrations,
74+
allIntegrations: state.integrations,
7375
justCurrent: state.current,
7476
current: state.current === props.id,
7577
isGlobal: state.current === 'global',
@@ -195,7 +197,7 @@ export const withProvider = function <T extends object>(
195197
value={{
196198
date,
197199
integration: selectedIntegration.integration,
198-
allIntegrations: integrations.map((p) => p.integration),
200+
allIntegrations,
199201
value: value.map((p) => ({
200202
id: p.id,
201203
content: p.content,

0 commit comments

Comments
 (0)