lovely. got a couple of partial implementations....
This commit is contained in:
parent
89ca4013fd
commit
89f526e9d9
14 changed files with 180 additions and 154 deletions
|
@ -1,8 +1,8 @@
|
|||
import type { Category, Entry } from './types';
|
||||
import { cache } from "@solidjs/router";
|
||||
import { query } from "@solidjs/router";
|
||||
import { entries } from './data';
|
||||
|
||||
export const listCategories = cache(async (): Promise<Category[]> => {
|
||||
export const listCategories = query(async (): Promise<Category[]> => {
|
||||
"use server";
|
||||
|
||||
return [
|
||||
|
@ -25,7 +25,7 @@ export const listCategories = cache(async (): Promise<Category[]> => {
|
|||
];
|
||||
}, 'series.categories.list');
|
||||
|
||||
export const getEntry = cache(async (id: Entry['id']): Promise<Entry | undefined> => {
|
||||
export const getEntry = query(async (id: Entry['id']): Promise<Entry | undefined> => {
|
||||
"use server";
|
||||
|
||||
return entries.get(id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue