Skip to content

Commit

Permalink
feat: fix duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
nevo-david committed Jan 5, 2025
1 parent 4ad975d commit 5fb5919
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions apps/frontend/src/components/launches/calendar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
'use client';

import React, {
FC, Fragment, memo, useCallback, useEffect, useMemo, useState
FC,
Fragment,
memo,
useCallback,
useEffect,
useMemo,
useState,
} from 'react';
import {
CalendarContext,
Expand Down Expand Up @@ -442,7 +448,19 @@ export const CalendarColumn: FC<{
children: (
<ExistingData value={data}>
<AddEditModal
{...(isDuplicate ? { onlyValues: data.posts } : {})}
{...(isDuplicate
? {
onlyValues: data.posts.map(
({ image, settings, content }: any) => {
return {
image,
settings,
content,
};
}
),
}
: {})}
allIntegrations={integrations.map((p) => ({ ...p }))}
reopenModal={editPost(post)}
mutate={reloadCalendarView}
Expand Down

0 comments on commit 5fb5919

Please sign in to comment.