mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-08 12:57:48 +00:00
migrate to runes
This commit is contained in:
@@ -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];
|
||||
|
||||
|
||||
@@ -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;
|
||||
}, {})
|
||||
|
||||
Reference in New Issue
Block a user