Skip to content

Commit

Permalink
Prototype web move towards hono
Browse files Browse the repository at this point in the history
  • Loading branch information
phisn committed Nov 3, 2024
1 parent b08faca commit 84266ec
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 1,812 deletions.
6 changes: 2 additions & 4 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
"@react-three/drei": "^9.80.9",
"@react-three/fiber": "^8.13.7",
"@stdlib/math": "^0.0.11",
"@tanstack/react-query": "^4.33.0",
"@trpc/client": "^10.38.1",
"@trpc/react-query": "^10.38.1",
"@trpc/server": "^10.38.1",
"@use-gesture/react": "^10.3.1",
"@vitejs/plugin-react": "^4.0.4",
"clsx": "^2.0.0",
Expand All @@ -29,6 +25,7 @@
"dexie-react-hooks": "^1.1.6",
"game": "*",
"game-web": "*",
"hono": "4.6.3",
"js-sdsl": "^4.4.2",
"jssha": "^3.3.1",
"lz-string": "^1.5.0",
Expand Down Expand Up @@ -58,6 +55,7 @@
"autoprefixer": "^10.4.15",
"eslint-config-custom": "*",
"postcss": "^8.4.29",
"server": "*",
"tailwindcss": "^3.3.3",
"tsconfig": "*",
"typescript": "^5.2.2",
Expand Down
4 changes: 4 additions & 0 deletions packages/web/src/common/rpc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { hc } from "hono/client"
import type { AppType } from "server/src/index"

const client = hc<AppType>("")
6 changes: 3 additions & 3 deletions packages/web/src/common/store/slices/slice-auth.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { CurrentUserDTO } from "shared/src/worker-api/user"
import { UserDTO } from "shared/src/server/user"
import { StateCreator } from "zustand"
import { AppStore } from "../app-store"

export interface AuthSlice {
currentUser?: CurrentUserDTO
currentUser?: UserDTO
currentUserJwt?: string

logout(): void
setCurrentUser(user: CurrentUserDTO): void
setCurrentUser(user: UserDTO): void
setCurrentUserJwt(jwt: string): void
}

Expand Down
18 changes: 0 additions & 18 deletions packages/web/src/common/trpc/TrpcProvider.tsx

This file was deleted.

31 changes: 0 additions & 31 deletions packages/web/src/common/trpc/auth-sync-link.ts

This file was deleted.

39 changes: 0 additions & 39 deletions packages/web/src/common/trpc/trpc-native.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/web/src/common/trpc/trpc.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/web/src/pages/campaign/Campaign.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useState } from "react"
import { WorldInfoUnlocked } from "../../../../shared/src/worker-api/world-info"
import { GamemodeModal } from "./GamemodeModal"
import { WorldSelection } from "./WorldSelection"

Expand Down
Loading

0 comments on commit 84266ec

Please sign in to comment.