Behebt Demo-Modus: committete Env-Dateien und Project-ID-Fallback
.env.development/.env.production und zentraler isDemoMode verhindern leere VITE_APPWRITE_PROJECT_ID nach git clone ohne lokale .env. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
73d6c50b8d
commit
f5257cd251
10 files changed
+108
-30
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { useState, useEffect, useCallback } from 'react'
|
||||
import { databases, DATABASE_ID, COLLECTIONS, Query, ID } from '../lib/appwrite'
|
||||
import { databases, DATABASE_ID, COLLECTIONS, Query, ID, isDemoMode } from '../lib/appwrite'
|
||||
|
||||
const DEMO_MODE = !import.meta.env.VITE_APPWRITE_PROJECT_ID
|
||||
const DEMO_MODE = isDemoMode
|
||||
|
||||
// Demo data for testing without Appwrite
|
||||
const lastWeek = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000)
|
||||
|
||||
Reference in new issue
Block a user