fixes
This commit is contained in:
parent
350c767a13
commit
44fa60a04f
4 changed files with 77 additions and 24 deletions
|
@ -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>
|
||||
|
|
3
src/routes/(shell)/settings.tsx
Normal file
3
src/routes/(shell)/settings.tsx
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default function Settings() {
|
||||
return <>SETTINGS PAGE</>;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue