Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: fix backwards compatibility + api requests

Nevo Davidf077d99049d4
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 50db835aa..d08e1358e 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<AddEditModalProps> = (props) => {
0,
existingData.integration,
existingData.posts.map((post) => ({
- content: post.content
- .split('\n')
- .map((line: string) => `<p>${line}</p>`)
- .join(''),
+ content:
+ post.content.indexOf('<p>') > -1
+ ? post.content
+ : post.content
+ .split('\n')
+ .map((line: string) => `<p>${line}</p>`)
+ .join(''),
id: post.id,
// @ts-ignore
media: post.image as any[],
@@ -160,7 +163,13 @@ export const AddEditModalInnerInner: FC<AddEditModalProps> = (props) => {
0,
props.onlyValues?.length
? props.onlyValues.map((p) => ({
- content: p.content,
+ content:
+ p.content.indexOf('<p>') > -1
+ ? p.content
+ : p.content
+ .split('\n')
+ .map((line: string) => `<p>${line}</p>`)
+ .join(''),
id: makeId(10),
media: p.image || [],
}))