fix: align pagination direction

This commit is contained in:
Stefan Imhoff
2023-06-10 18:29:42 +02:00
parent 7a707c9e59
commit 20d4365cb7
3 changed files with 3 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ import { mapping } from '../../mdx-components';
export async function getStaticPaths() { export async function getStaticPaths() {
const aiArtEntries = await getCollection('ai-art'); const aiArtEntries = await getCollection('ai-art');
const numberOfPages = aiArtEntries.length; const numberOfPages = aiArtEntries.length;
aiArtEntries.sort(sortBySortKey); aiArtEntries.sort(sortBySortKey).reverse();
return aiArtEntries.map((entry, index) => ({ return aiArtEntries.map((entry, index) => ({
params: { slug: entry.slug }, params: { slug: entry.slug },

View File

@@ -14,7 +14,7 @@ import { Tag } from '../../components';
export async function getStaticPaths() { export async function getStaticPaths() {
const projectEntries = await getCollection('projects', ({ data }) => data.showcase === true); const projectEntries = await getCollection('projects', ({ data }) => data.showcase === true);
const numberOfPages = projectEntries.length; const numberOfPages = projectEntries.length;
projectEntries.sort(sortBySortKey).reverse(); projectEntries.sort(sortBySortKey);
return projectEntries.map((entry, index) => ({ return projectEntries.map((entry, index) => ({
params: { slug: entry.slug }, params: { slug: entry.slug },

View File

@@ -13,7 +13,7 @@ import { mapping } from '../../mdx-components';
export async function getStaticPaths() { export async function getStaticPaths() {
const sketchnotesEntries = await getCollection('sketchnotes'); const sketchnotesEntries = await getCollection('sketchnotes');
const numberOfPages = sketchnotesEntries.length; const numberOfPages = sketchnotesEntries.length;
sketchnotesEntries.sort(sortBySortKey); sketchnotesEntries.sort(sortBySortKey).reverse();
return sketchnotesEntries.map((entry, index) => ({ return sketchnotesEntries.map((entry, index) => ({
params: { slug: entry.slug }, params: { slug: entry.slug },