diff --git a/package.json b/package.json index d6151dd0..8aef58b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "21.0.0", + "version": "21.0.1", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "scripts": { diff --git a/src/data/badges.js b/src/data/badges.js index fc17d64f..9c9ebfe5 100644 --- a/src/data/badges.js +++ b/src/data/badges.js @@ -19,8 +19,8 @@ const fetchAllBadges = async () => { const transformedData = data.map(badge => ({ ...badge, - image: badge.image?.filename_disk || '', - })).sort((a, b) => a.sort - b.sort) + image: badge.image?.['filename_disk'] || '', + })).sort((a, b) => a['sort'] - b['sort']) return transformedData } diff --git a/src/data/blogroll.js b/src/data/blogroll.js index 547be3a6..61e460d2 100644 --- a/src/data/blogroll.js +++ b/src/data/blogroll.js @@ -16,7 +16,7 @@ const fetchBlogroll = async () => { return [] } - return data.sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase())) + return data.sort((a, b) => a['name'].toLowerCase().localeCompare(b['name'].toLowerCase())) } export default async function () { diff --git a/src/data/music.js b/src/data/music.js index a326f762..4cb81b8f 100644 --- a/src/data/music.js +++ b/src/data/music.js @@ -69,7 +69,7 @@ const aggregateData = (data, groupByField, groupByType, genreMapping) => { aggregation[key].plays++ }) - return Object.values(aggregation).sort((a, b) => b.plays - a.plays).map((item, index) => ({ ...item, rank: index + 1 })) + return Object.values(aggregation).sort((a, b) => b['plays'] - a['plays']).map((item, index) => ({ ...item, rank: index + 1 })) } const buildRecents = (data) => { diff --git a/src/data/robots.js b/src/data/robots.js index 885538b0..cc2cc84b 100644 --- a/src/data/robots.js +++ b/src/data/robots.js @@ -3,7 +3,6 @@ import { createClient } from '@supabase/supabase-js' const SUPABASE_URL = process.env.SUPABASE_URL const SUPABASE_KEY = process.env.SUPABASE_KEY const supabase = createClient(SUPABASE_URL, SUPABASE_KEY) - const PAGE_SIZE = 100 const fetchAllRobots = async () => { @@ -26,7 +25,7 @@ const fetchAllRobots = async () => { from += PAGE_SIZE } - return robots.map(robot => robot.user_agent).sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase())) + return robots.map(robot => robot['user_agent']).sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase())) } export default async function () { diff --git a/src/data/tv.js b/src/data/tv.js index 98d1db43..02197255 100644 --- a/src/data/tv.js +++ b/src/data/tv.js @@ -129,7 +129,7 @@ export default async function () { try { const rawShows = await fetchAllShows() const shows = rawShows.map(prepareShowData) - const episodes = shows.flatMap(prepareEpisodeData).sort((a, b) => new Date(b.last_watched_at) - new Date(a.last_watched_at)) + const episodes = shows.flatMap(prepareEpisodeData).sort((a, b) => new Date(b['last_watched_at']) - new Date(a['last_watched_at'])) const favoriteShows = shows.filter(show => show.favorite) @@ -137,7 +137,7 @@ export default async function () { shows, watchHistory: formatEpisodeData(episodes), recentlyWatched: formatEpisodeData(episodes.slice(0, 225)), - favorites: formatEpisodeData(favoriteShows.flatMap(prepareEpisodeData)).sort((a, b) => a.name.localeCompare(b.name)), + favorites: formatEpisodeData(favoriteShows.flatMap(prepareEpisodeData)).sort((a, b) => a['name'].localeCompare(b['name'])), } } catch (error) { console.error('Error fetching and processing shows data:', error)