fix(build): fix build issues

- remove games reference after removing collection
- update obsolote localizations
This commit is contained in:
Alexander Navarro 2024-03-21 22:43:15 -03:00
parent a85f9adc9b
commit 218216dcd8
12 changed files with 234 additions and 363 deletions

View file

@ -1,30 +1,26 @@
---
import type { InferGetStaticPropsType, GetStaticPaths } from 'astro';
import { changeLanguage } from 'i18next';
import { getCollection } from 'astro:content';
import Layout from '@layouts/Layout.astro';
import Card from '@components/Card.astro';
import Pagination from '@components/Pagination.astro';
import { Image } from 'astro:assets';
import type { InferGetStaticPropsType, GetStaticPaths } from "astro";
import { changeLanguage } from "i18next";
import { getCollection } from "astro:content";
import Layout from "@layouts/Layout.astro";
import Card from "@components/Card.astro";
import Pagination from "@components/Pagination.astro";
import { Image } from "astro:assets";
changeLanguage('en');
changeLanguage("en");
export const getStaticPaths = (async ({ paginate }) => {
const rawEntries = await getCollection('portafolio', ({ data }) => {
return import.meta.env.PROD ? data.draft !== true : true;
});
const entries = rawEntries.map((item, idx) => ({
...item.data,
id: idx + 1,
slug: item.slug,
}));
return paginate(entries, { pageSize: 6 });
const rawEntries = await getCollection("portafolio", ({ data }) => {
return import.meta.env.PROD ? data.draft !== true : true;
});
const entries = rawEntries.map((item, idx) => ({
...item.data,
id: idx + 1,
slug: item.slug,
}));
return paginate(entries, { pageSize: 6 });
}) satisfies GetStaticPaths;
type Props = InferGetStaticPropsType<typeof getStaticPaths>;
const { page } = Astro.props;
---