feat: backward compatibility
This commit is contained in:
parent
f88730bda8
commit
f8f1d5a906
|
|
@ -166,15 +166,7 @@ const FirstStep: FC = (props) => {
|
|||
mutate={reloadCalendarView}
|
||||
date={dayjs.utc(load.date).local()}
|
||||
reopenModal={() => ({})}
|
||||
onlyValues={messages.map((p: any) => {
|
||||
return {
|
||||
...p,
|
||||
content: p.content
|
||||
.split('\n')
|
||||
.map((line: string) => `<p>${line}</p>`)
|
||||
.join(''),
|
||||
};
|
||||
})}
|
||||
onlyValues={messages}
|
||||
/>
|
||||
),
|
||||
size: '80%',
|
||||
|
|
|
|||
|
|
@ -33,14 +33,15 @@ export interface AddEditModalProps {
|
|||
}
|
||||
|
||||
export const AddEditModal: FC<AddEditModalProps> = (props) => {
|
||||
const { setAllIntegrations, setDate, setIsCreateSet, setDummy } = useLaunchStore(
|
||||
useShallow((state) => ({
|
||||
setAllIntegrations: state.setAllIntegrations,
|
||||
setDate: state.setDate,
|
||||
setIsCreateSet: state.setIsCreateSet,
|
||||
setDummy: state.setDummy,
|
||||
}))
|
||||
);
|
||||
const { setAllIntegrations, setDate, setIsCreateSet, setDummy } =
|
||||
useLaunchStore(
|
||||
useShallow((state) => ({
|
||||
setAllIntegrations: state.setAllIntegrations,
|
||||
setDate: state.setDate,
|
||||
setIsCreateSet: state.setIsCreateSet,
|
||||
setDummy: state.setDummy,
|
||||
}))
|
||||
);
|
||||
|
||||
const integrations = useLaunchStore((state) => state.integrations);
|
||||
useEffect(() => {
|
||||
|
|
@ -139,7 +140,10 @@ export const AddEditModalInnerInner: FC<AddEditModalProps> = (props) => {
|
|||
0,
|
||||
existingData.integration,
|
||||
existingData.posts.map((post) => ({
|
||||
content: post.content,
|
||||
content: post.content
|
||||
.split('\n')
|
||||
.map((line: string) => `<p>${line}</p>`)
|
||||
.join(''),
|
||||
id: post.id,
|
||||
// @ts-ignore
|
||||
media: post.image as any[],
|
||||
|
|
@ -163,7 +167,10 @@ export const AddEditModalInnerInner: FC<AddEditModalProps> = (props) => {
|
|||
: props.set?.posts?.length
|
||||
? props.set.posts[0].value.map((p: any) => ({
|
||||
id: makeId(10),
|
||||
content: p.content,
|
||||
content: p.content
|
||||
.split('\n')
|
||||
.map((line: string) => `<p>${line}</p>`)
|
||||
.join(''),
|
||||
// @ts-ignore
|
||||
media: p.media,
|
||||
}))
|
||||
|
|
|
|||
Loading…
Reference in New Issue