Dependencies upgrade

This commit is contained in:
Julien Valverdé
2024-07-08 00:05:48 +02:00
parent b89ecc6526
commit 94c4e4e9f7
8 changed files with 55 additions and 10 deletions

View File

@@ -9,7 +9,9 @@
"preview": "vite preview"
},
"dependencies": {
"@effect/schema": "^0.68.17",
"@tanstack/react-query": "4",
"@thilawyn/thilalib": "^0.1.5",
"@trpc/client": "^10.45.2",
"@trpc/react-query": "^10.45.2",
"react": "^18.3.1",
@@ -19,8 +21,8 @@
"@todo-tests/common": "workspace:*",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
@@ -28,6 +30,6 @@
"eslint-plugin-react-refresh": "^0.4.7",
"postcss": "^8.4.39",
"tailwindcss": "^3.4.4",
"vite": "^5.3.1"
"vite": "^5.3.3"
}
}

View File

@@ -1,10 +1,14 @@
import { Index } from "./Index"
import "./index.css"
import { TRPCClientProvider } from "./trpc/TRPCClientProvider"
export function App() {
return (
<TRPCClientProvider>
<Index />
</TRPCClientProvider>
)
}

View File

@@ -0,0 +1,29 @@
import { Schema as S } from "@effect/schema"
import { JsonifiableTodo } from "@todo-tests/common/data"
import { Todo } from "./data"
import { trpc } from "./trpc/trpc"
const decodeTodos = S.decodeSync(
S.mutable(
S.Array(
JsonifiableTodo.pipe(S.compose(Todo))
)
)
)
export function Index() {
const todosQuery = trpc.todos.all.useQuery(undefined, { select: decodeTodos })
return <>
<div className="container mx-auto">
<p className="text-4xl text-center">Todos</p>
</div>
</>
}

View File

@@ -0,0 +1,9 @@
import { MobXObservable, MutableClass } from "@thilawyn/thilalib/effect/schema/class"
import { Todo as CommonTodo } from "@todo-tests/common/data"
export class Todo
extends MutableClass<Todo>("Todo")(CommonTodo.fields).pipe(
MobXObservable
)
{}

View File

@@ -0,0 +1 @@
export * from "./Todo"