Skip to content

Commit

Permalink
Minor fixes to templates and locales (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
pushchris authored Oct 8, 2023
1 parent 58f2a71 commit e567132
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/ui/src/views/campaign/CampaignDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const createLocale = async ({ locale, data }: LocaleParams, campaign: Cam
campaign_id: campaign.id,
type: campaign.channel,
locale,
data: template?.data ? { ...template?.data, ...data } : undefined,
data: template?.data || data ? { ...template?.data, ...data } : undefined,
})
}

Expand Down
2 changes: 1 addition & 1 deletion apps/ui/src/views/campaign/TemplateCreateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function CreateTemplateModal({ open, setIsOpen, campaign, onCreat
api.locales.search(project.id, { limit: 100 })
.then((result) => setLocales(result.results))
.catch(() => {})
})
}, [])

async function handleCreateTemplate(params: LocaleParams) {
const template = await createLocale(params, campaign)
Expand Down

0 comments on commit e567132

Please sign in to comment.