diff --git a/package.json b/package.json index ea3f62f..0539fcd 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "scripts": { "dev": "vite", "build": "tsc && vite build", + "build:preview": "tsc && vite build && mkdir dist/quiz && mv dist/index.html dist/quiz && mv dist/assets/ dist/quiz && code dist", "ci": "tsc && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" diff --git a/src/index.css b/src/index.css index 9073d6f..ecfa7c5 100644 --- a/src/index.css +++ b/src/index.css @@ -20,6 +20,7 @@ main { main > .container { min-height: calc(100vh - 198px); transition: height 0.3s; + max-width: 1024px; } footer { diff --git a/src/view/components/game/GamePlaySession.tsx b/src/view/components/game/GamePlaySession.tsx index e0af480..c5ce71c 100644 --- a/src/view/components/game/GamePlaySession.tsx +++ b/src/view/components/game/GamePlaySession.tsx @@ -91,6 +91,13 @@ export function GamePlaySession ({ game, onStart, onFinish }: GamePlaySessionPro /> +
+
+
-
+
{game.questions.length - questions.length} / {game.questions.length} ({interaction})   { @@ -109,13 +116,6 @@ export function GamePlaySession ({ game, onStart, onFinish }: GamePlaySessionPro '' }
-
-
-
diff --git a/src/view/pages/auth/SignInPage.tsx b/src/view/pages/auth/SignInPage.tsx index 87a583d..3db224c 100644 --- a/src/view/pages/auth/SignInPage.tsx +++ b/src/view/pages/auth/SignInPage.tsx @@ -3,6 +3,7 @@ import { useNavigate } from 'react-router-dom' import { useApp } from '../../hooks/useApp.ts' import { AlertDanger } from '../../components/general/Alert.tsx' import { mode } from '../../../config/env.ts' +import { Loading } from '../../components/general/Loading.tsx' export function SignInPage () { const { auth, session } = useApp() @@ -97,6 +98,11 @@ export function SignInPage () { Entrar
+ { + loading && ( + + ) + } {error && ( {error} diff --git a/src/view/providers/AppProvider.tsx b/src/view/providers/AppProvider.tsx index 73431d6..2b846ba 100644 --- a/src/view/providers/AppProvider.tsx +++ b/src/view/providers/AppProvider.tsx @@ -11,7 +11,9 @@ export function AppProvider ({ children }: { children: React.ReactNode }) { const [session, setSession] = useState(null) const updateAuthSession = (session: Session) => { - setSession(session) + if (session?.credential) { + setSession(session) + } } const auth = authManagerFactory(updateAuthSession)