diff --git a/src/App.js b/src/App.js index 90185ee..c285593 100644 --- a/src/App.js +++ b/src/App.js @@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react'; import { initializeApp } from 'firebase/app'; import { getAuth, signInAnonymously, onAuthStateChanged, signInWithCustomToken } from 'firebase/auth'; import { getFirestore, doc, setDoc, addDoc, getDoc, getDocs, collection, onSnapshot, updateDoc, deleteDoc, query, writeBatch } from 'firebase/firestore'; -import { ArrowLeft, PlusCircle, Users, Swords, Shield, Trash2, Eye, Edit3, Save, XCircle, ChevronsUpDown, ChevronDown, ChevronUp, UserCheck, UserX, HeartCrack, HeartPulse, Zap, Share2, Copy as CopyIcon, Image as ImageIcon, EyeOff, ExternalLink } from 'lucide-react'; // Added ExternalLink +import { ArrowLeft, PlusCircle, Users, Swords, Shield, Trash2, Eye, Edit3, Save, XCircle, ChevronsUpDown, ChevronDown, ChevronUp, UserCheck, UserX, HeartCrack, HeartPulse, Zap, Share2, Copy as CopyIcon, Image as ImageIcon, EyeOff, ExternalLink } from 'lucide-react'; // --- Firebase Configuration --- const firebaseConfig = { @@ -52,7 +52,6 @@ function App() { const [isPlayerViewOnlyMode, setIsPlayerViewOnlyMode] = useState(false); useEffect(() => { - // Check for query parameter to determine if this is a player-only display window const queryParams = new URLSearchParams(window.location.search); if (queryParams.get('playerView') === 'true') { setIsPlayerViewOnlyMode(true); @@ -114,17 +113,12 @@ function App() { } const openPlayerWindow = () => { - // Construct the URL for the player view. - // It's the current path + ?playerView=true - // window.location.origin gives http://localhost:3000 - // window.location.pathname gives / (or your base path if deployed in a subfolder) const playerViewUrl = window.location.origin + window.location.pathname + '?playerView=true'; - window.open(playerViewUrl, '_blank', 'noopener,noreferrer,width=1024,height=768'); // Opens in a new tab/window + window.open(playerViewUrl, '_blank', 'noopener,noreferrer,width=1024,height=768'); }; if (isPlayerViewOnlyMode) { - // Render only the DisplayView if in player-only mode return (
Authenticating...
}