Skip to content

Commit dda7e34

Browse files
committed
chore: upgrade dependencies
1 parent b539557 commit dda7e34

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@fontsource-variable/fira-code": "^5.2.6",
3030
"@fontsource-variable/playfair-display": "^5.2.5",
3131
"astro": "^5.8.0",
32-
"astro-loader-i18n": "^0.7.0",
32+
"astro-loader-i18n": "^0.7.1",
3333
"fsevents": "^2.3.3",
3434
"limax": "^4.1.0",
3535
"pagefind": "^1.3.0",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pages/[...locale]/[projects]/index.astro

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
generateGetStaticIndexPaths,
88
defaultPropsAndParamsOptions,
99
} from "../../../utils/paths";
10-
import { i18nPropsAndParams } from "astro-loader-i18n";
10+
import { i18nProps } from "astro-loader-i18n";
1111
import sluggify from "limax";
1212
1313
export const getStaticPaths = generateGetStaticIndexPaths(
@@ -19,7 +19,7 @@ const {
1919
data: { locale },
2020
} = Astro.props;
2121
const collection = await getCollection("projects");
22-
const projects = i18nPropsAndParams(collection, {
22+
const projects = i18nProps(collection, {
2323
...defaultPropsAndParamsOptions,
2424
routePattern: `${Astro.routePattern}/[project]`,
2525
generateSegments: (entry) => ({ project: sluggify(entry.data.title) }),
@@ -33,12 +33,10 @@ const t = useTranslations(parseLocale(locale));
3333
<ul>
3434
{
3535
projects
36-
.map(({ props }) => {
36+
.map(({ translatedPath, data: { title } }) => {
3737
return (
3838
<li>
39-
<a href={props.translatedPath}>
40-
{props.data.title}
41-
</a>
39+
<a href={translatedPath}>{title}</a>
4240
</li>
4341
);
4442
})

0 commit comments

Comments
 (0)