Skip to content

Commit

Permalink
fix: merge regression
Browse files Browse the repository at this point in the history
  • Loading branch information
pmelab committed Oct 3, 2024
1 parent e7de6c2 commit bcb009c
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions apps/decap/src/collections/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,18 +233,14 @@ const getPages = (path: string) => {
const page = pageSchema.safeParse(input);
if (page.success) {
const editUrl = `${process.env.NETLIFY_URL || 'http://127.0.0.1:8000'}/admin/#/collections/page/entries/${file.replace(/\.yml$/, '')}`;
translations.push([
`${page.data.id}:${lang}`,
{
...page.data,
_decap_id: id,
editLink: {
__typename: 'EditLink',
url: editUrl,
type: 'decap',
},
translations.push({
...page.data,
editLink: {
__typename: 'EditLink',
url: editUrl,
type: 'decap',
},
]);
});
} else {
console.warn(`Error parsing ${file} (${lang}):`);
console.warn(page.error.message);
Expand Down

0 comments on commit bcb009c

Please sign in to comment.