File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed
frontend/app/routes/posts Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -11,28 +11,11 @@ import SwitchLoadingModes from "~/routes/posts/components/SwitchLoadingModes"
1111import { useApplicationContext } from "~/layouts/useApplicationContext"
1212import { z } from "zod/v4"
1313import PostsTable from "./components/PostsTable"
14+ import { apiSchema } from "./home"
1415
1516/*
1617* This page uses page-tailored APIs
1718* */
18- export const apiSchema = z . strictObject ( {
19- posts : z . array ( z . strictObject ( {
20- id : z . number ( ) ,
21- content : z . string ( ) ,
22- author : z . strictObject ( {
23- email : z . string ( ) ,
24- } ) ,
25- highlighted : z . boolean ( ) ,
26- canEditPost : z . boolean ( ) ,
27- createdAt : z . iso . datetime ( { offset : true } ) . transform ( ( date ) => new Date ( date ) ) ,
28- } ) ) ,
29- pagination : z . strictObject ( {
30- prevPage : z . number ( ) . nullable ( ) ,
31- nextPage : z . number ( ) . nullable ( )
32- } ) ,
33- permissions : z . strictObject ( { canCreatePost : z . boolean ( ) } )
34- } ) ;
35-
3619export async function clientLoader ( { params} : Route . ClientLoaderArgs ) {
3720 return null
3821}
You can’t perform that action at this time.
0 commit comments