Skip to content

Commit

Permalink
Rearrange imports
Browse files Browse the repository at this point in the history
  • Loading branch information
PuruVJ committed Feb 11, 2024
1 parent c0f7217 commit e165ca0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/quickstart/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "quickstart-vite",
"name": "quickstart",
"private": true,
"version": "0.0.0",
"type": "module",
Expand Down
18 changes: 9 additions & 9 deletions examples/quickstart/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import User from "./module_bindings/user";
import { Identity, SpacetimeDBClient } from "@clockworklabs/spacetimedb-sdk";
import React, { useEffect, useRef, useState } from "react";

// Register the tables and reducers before creating the SpacetimeDBClient
SpacetimeDBClient.registerTables(Message, User);
SpacetimeDBClient.registerReducers(SendMessageReducer, SetNameReducer);

export type MessageType = {
name: string;
message: string;
};

// Register the tables and reducers before creating the SpacetimeDBClient
SpacetimeDBClient.registerTables(Message, User);
SpacetimeDBClient.registerReducers(SendMessageReducer, SetNameReducer);

const token = localStorage.getItem("auth_token") || undefined;
const spacetimeDBClient = new SpacetimeDBClient(
"ws://localhost:3000",
Expand Down Expand Up @@ -170,7 +170,7 @@ function App() {
return (
<div className="App">
<div className="profile">
<h1>Profile</h1>
<h2>Profile</h2>
{!settingName ? (
<>
<p>{name}</p>
Expand All @@ -181,7 +181,7 @@ function App() {
setNewName(name);
}}
>
Edit Name
EDIT NAME
</button>
</>
) : (
Expand All @@ -192,12 +192,12 @@ function App() {
value={newName}
onChange={(e) => setNewName(e.target.value)}
/>
<button type="submit">Submit</button>
<button type="submit">SUBMIT</button>
</form>
)}
</div>
<div className="message">
<h1>Messages</h1>
<h2>Messages</h2>
{messages.length < 1 && <p>No messages</p>}
<div>
{messages.map((message) => (
Expand All @@ -210,7 +210,7 @@ function App() {
</div>
</div>
<div className="system" style={{ whiteSpace: "pre-wrap" }}>
<h1>System</h1>
<h2>System</h2>
<div>
<p>{systemMessage}</p>
</div>
Expand Down

0 comments on commit e165ca0

Please sign in to comment.