From f077d99049d4ce407cb3226857d0ad7e125d3596 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Wed, 16 Jul 2025 21:48:27 +0700 Subject: [PATCH] feat: fix backwards compatibility + api requests --- .../components/new-launch/add.edit.modal.tsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/apps/frontend/src/components/new-launch/add.edit.modal.tsx b/apps/frontend/src/components/new-launch/add.edit.modal.tsx index 50db835a..d08e1358 100644 --- a/apps/frontend/src/components/new-launch/add.edit.modal.tsx +++ b/apps/frontend/src/components/new-launch/add.edit.modal.tsx @@ -140,10 +140,13 @@ export const AddEditModalInnerInner: FC = (props) => { 0, existingData.integration, existingData.posts.map((post) => ({ - content: post.content - .split('\n') - .map((line: string) => `

${line}

`) - .join(''), + content: + post.content.indexOf('

') > -1 + ? post.content + : post.content + .split('\n') + .map((line: string) => `

${line}

`) + .join(''), id: post.id, // @ts-ignore media: post.image as any[], @@ -160,7 +163,13 @@ export const AddEditModalInnerInner: FC = (props) => { 0, props.onlyValues?.length ? props.onlyValues.map((p) => ({ - content: p.content, + content: + p.content.indexOf('

') > -1 + ? p.content + : p.content + .split('\n') + .map((line: string) => `

${line}

`) + .join(''), id: makeId(10), media: p.image || [], }))