This commit is contained in:
Chris Kruining 2025-04-14 23:50:40 +02:00
parent 350c767a13
commit 44fa60a04f
Signed by: chris
SSH key fingerprint: SHA256:nG82MUfuVdRVyCKKWqhY+pCrbz9nbX6uzUns4RKa1Pg
4 changed files with 77 additions and 24 deletions

View file

@ -1,20 +1,30 @@
import { Title } from '@solidjs/meta';
import { createAsync } from '@solidjs/router';
import { Overview } from '~/features/overview';
import { listCategories, getEntry } from '~/features/content';
import { Show } from 'solid-js';
import { Title } from "@solidjs/meta";
import { createAsync, query } from "@solidjs/router";
import { Overview } from "~/features/overview";
import { listCategories, getEntry } from "~/features/content";
import { createEffect, Show } from "solid-js";
const load = query(async () => {
"use server";
// const response =
}, "home.data");
export const route = {
load: () => ({
highlight: getEntry(14),
categories: listCategories(),
preload: async () => ({
highlight: await getEntry("14"),
categories: await listCategories(),
}),
};
export default function Home() {
const highlight = createAsync(() => getEntry(14));
const highlight = createAsync(() => getEntry("14"));
const categories = createAsync(() => listCategories());
createEffect(() => {
console.log(highlight(), categories());
});
return (
<>
<Title>Home</Title>

View file

@ -0,0 +1,3 @@
export default function Settings() {
return <>SETTINGS PAGE</>;
}