Skip to content

Commit

Permalink
package.json: upgrade supabase CLI, client library, DB config
Browse files Browse the repository at this point in the history
  • Loading branch information
cmnord committed Jul 13, 2024
1 parent 5a07bd7 commit c983310
Show file tree
Hide file tree
Showing 5 changed files with 295 additions and 233 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ npm install
Start the Supabase project:

```ts
npx supabase start
npm run db:start
```

Set environment variables. In particular, set `SUPABASE_URL`,
Expand Down Expand Up @@ -51,7 +51,7 @@ View mock emails sent for password reset and email verification at
Link to your own production Supabase project with:

```sh
npx supabase link --project-ref $SUPABASE_PROJECT_REF --password $SUPBABASE_DB_PASSWORD
npx supabase link --project-ref $SUPABASE_PROJECT_REF --password $SUPABASE_DB_PASSWORD
```

### Make a migration[^1]
Expand Down
5 changes: 1 addition & 4 deletions app/engine/use-game-engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export function useGameEngine(
},
(payload) => {
const newEvent = payload.new;
setLastMessageAt(Date.now());
if (!isTypedRoomEvent(newEvent)) {
throw new Error(
"unhandled room event type from DB: " + newEvent.type,
Expand Down Expand Up @@ -211,10 +212,6 @@ export function useGameEngine(

subscribeToChannel();

channel.socket.conn?.addEventListener("message", () => {
setLastMessageAt(Date.now());
});

// cleanup function to unsubscribe from the channel
return () => {
if (channel.state === "joined") {
Expand Down
Loading

0 comments on commit c983310

Please sign in to comment.