migrate to runes

This commit is contained in:
Jesse Winton
2025-04-02 08:22:25 -04:00
parent 3d3b140e62
commit fc33fec0fd
11 changed files with 78 additions and 59 deletions

View File

@@ -8,7 +8,7 @@
'Follow a simple tutorial to get started with Appwrite in your preferred framework quickly and easily.';
const ogImage = DEFAULT_HOST + '/images/open-graph/docs.png';
export let data;
let { data } = $props();
type MappedTutorial = (typeof data.tutorials)[number];

View File

@@ -55,13 +55,14 @@ export async function load() {
const tutorials = Object.entries(
allTutorials.reduce((acc: { [key: string]: any[] }, item) => {
const cat = item.category as string;
// If the category does not exist in the accumulator, initialize it
if (!acc[item.category]) {
acc[item.category] = [];
if (!acc[cat]) {
acc[cat] = [];
}
// Push the current item into the appropriate category
acc[item.category].push(item);
acc[cat].push(item);
return acc;
}, {})