Skip to content

Commit 96025b1

Browse files
fix(docs): update degit and clone commands to use the correct repository URL
refactor(app): clean up authentication status rendering in App component style(app): remove unnecessary margin from grid layout in App.css
1 parent 83f06b1 commit 96025b1

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ We recommend using the first option for a quick start.
1111
2. Use [degit](https://github.com/Rich-Harris/degit) to scaffold the project:
1212

1313
```bash
14-
npx degit powersync-product-success/vite-react-ts-powersync-supabase
14+
npx degit powersync-community/vite-react-ts-powersync-supabase
1515
```
1616

1717
> **Note**: `degit` is a tool that downloads the latest version of a repository without the git history, giving you a clean starting point. Add a second argument to specify your project name (e.g., my-app).
1818
1919
3. Clone the repository directly and install dependencies:
2020

2121
```bash
22-
git clone https://github.com/powersync-product-success/vite-react-ts-powersync-supabase.git
22+
git clone https://github.com/powersync-community/vite-react-ts-powersync-supabase.git
2323
```
2424

2525
## Usage

src/App.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ body {
8484
display: grid;
8585
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
8686
gap: 1rem;
87-
margin-bottom: 1.5rem;
8887
}
8988

9089
.status-card,

src/App.tsx

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ function App() {
3333

3434
// First check if we already have a session
3535
let session = connector.currentSession;
36-
36+
3737
if (!session) {
3838
// Only sign in anonymously if we don't have a session
3939
session = await connector.signInAnonymously();
4040
}
41-
41+
4242
const userId = session?.user?.id;
4343

4444
if (userId) {
@@ -81,7 +81,7 @@ function App() {
8181
}
8282
console.log("No user ID, attempting to authenticate...");
8383
await fetchUserID();
84-
84+
8585
// If still no userID after fetch, don't proceed
8686
if (!userID) {
8787
console.error("Cannot create counter: No authenticated user");
@@ -129,16 +129,13 @@ function App() {
129129
</div>
130130
<div><strong>hasSynced:</strong> {status.hasSynced?.toString() ?? "false"}</div>
131131
<div><strong>lastSyncedAt:</strong> {status.lastSyncedAt?.toLocaleString() ?? "N/A"}</div>
132+
133+
<div><strong>User ID:</strong> {userID || "Not authenticated"}</div>
134+
{isAuthenticating && <div><strong>Status:</strong> Authenticating...</div>}
135+
{authError && <div style={{ color: 'red' }}><strong>Auth Error:</strong> {authError}</div>}
132136
</>
133137
)}
134138
</div>
135-
136-
{/* Authentication Status */}
137-
<div className="auth-status">
138-
<div><strong>User ID:</strong> {userID || "Not authenticated"}</div>
139-
{isAuthenticating && <div><strong>Status:</strong> Authenticating...</div>}
140-
{authError && <div style={{color: 'red'}}><strong>Auth Error:</strong> {authError}</div>}
141-
</div>
142139
</div>
143140

144141
<div className="logo-card">
@@ -188,7 +185,7 @@ function App() {
188185
<>
189186
{/* Show authentication status or create counter button */}
190187
{!userID ? (
191-
<p>Please sign in to create a counter.</p>
188+
<p>Please sign in to create a counter.</p>
192189
) : (
193190
<>
194191
{/* Only visible if the current user has not created a counter */}

0 commit comments

Comments
 (0)