diff --git a/frontend/src/app/App.tsx b/frontend/src/app/App.tsx index b8384c0..b58ab9a 100644 --- a/frontend/src/app/App.tsx +++ b/frontend/src/app/App.tsx @@ -10,6 +10,8 @@ import RequireAuth from "./routes/RequireAuth"; import QuizCallback from "./routes/QuizCallback"; import useAuthSession from "./hooks/useAuthSession"; import { socket } from "../socket/socket"; +import PrivacyPolicy from "./pages/PrivacyPolicy"; +import TermsOfService from "./pages/TermsOfService"; export default function App() { const { @@ -51,6 +53,8 @@ export default function App() { } /> } /> + } /> + } /> (null); @@ -163,9 +167,30 @@ return ( {/* --- 2. CONTENU PRINCIPAL DE LA PAGE --- */} -
- -
+
+ + {!hideFooter && ( +
+
+ + Privacy Policy + + + + + + Terms of Service + +
+
+ )} +
{/* --- 3. WIDGET CHAT --- */}
diff --git a/frontend/src/app/components/LoginPage.tsx b/frontend/src/app/components/LoginPage.tsx index 27ba7a8..c07b857 100644 --- a/frontend/src/app/components/LoginPage.tsx +++ b/frontend/src/app/components/LoginPage.tsx @@ -1,5 +1,6 @@ import { Sparkles, Mail, Lock, User, AlertCircle, Key, Github } from "lucide-react"; import { useState } from "react"; +import { Link } from "react-router-dom"; interface LoginPageProps { onLogin?: () => void; @@ -63,7 +64,7 @@ export default function LoginPage({ onLogin, force2FA = false }: LoginPageProps) }; return ( -
+
{/* Background decorative elements */}
@@ -230,6 +231,25 @@ export default function LoginPage({ onLogin, force2FA = false }: LoginPageProps) )}
+
+
+ + Privacy Policy + + + + + + Terms of Service + +
+
); } diff --git a/frontend/src/app/components/PartyGame.tsx b/frontend/src/app/components/PartyGame.tsx index 7039dd7..278a8c9 100644 --- a/frontend/src/app/components/PartyGame.tsx +++ b/frontend/src/app/components/PartyGame.tsx @@ -91,6 +91,7 @@ export default function QuizPage() function initializeMatch(data: any) { + setGameStarted(false); setWaitingForFinal(false); const isPlayer1 = socket.id === data.player1.id; @@ -216,6 +217,7 @@ export default function QuizPage() setWaitingForFinal(false); setOpponentReady(false); setTournamentBracket(null); + setGameStarted(true); }, 5000); } else @@ -238,6 +240,9 @@ export default function QuizPage() socket.on("start_game", () => { + if (bracketTimeoutRef.current) + return; + setGameStarted(true); }); diff --git a/frontend/src/app/pages/PrivacyPolicy.tsx b/frontend/src/app/pages/PrivacyPolicy.tsx new file mode 100644 index 0000000..0a9ab6f --- /dev/null +++ b/frontend/src/app/pages/PrivacyPolicy.tsx @@ -0,0 +1,147 @@ +import { useNavigate } from "react-router-dom"; + +export default function PrivacyPolicy() { + const navigate = useNavigate(); + + return ( +
+
+

Privacy Policy

+ +

+ Last updated: August 2026 +

+ +
+

+ 1. Introduction +

+

+ This Privacy Policy explains how Culture Quiz collects, + uses and protects information when you use our multiplayer + quiz game and its related services. +

+
+ +
+

+ 2. Information We Collect +

+

+ Depending on how you use the application, we may collect: +

+
    +
  • Username and email address.
  • +
  • Account authentication information.
  • +
  • + Information provided through supported authentication + providers such as 42 and GitHub. +
  • +
  • Game results, scores and statistics.
  • +
  • Tournament participation and results.
  • +
  • Information required to maintain an active game session.
  • +
+
+ +
+

+ 3. How We Use Your Information +

+

+ We use this information to: +

+
    +
  • Create and manage your account.
  • +
  • Authenticate you and protect your account.
  • +
  • Provide multiplayer games and matchmaking.
  • +
  • Organize and manage tournaments.
  • +
  • Display profiles, leaderboards and game statistics.
  • +
  • Maintain the security and reliability of the application.
  • +
+
+ +
+

+ 4. Authentication +

+

+ Culture Quiz supports several authentication methods, + including local authentication and third-party authentication + providers. When using a third-party provider, certain + identification information may be received from that provider + in order to create or authenticate your Culture Quiz account. +

+
+ +
+

+ 5. Cookies and Sessions +

+

+ The application uses authentication cookies to maintain your + session. These cookies are used to authenticate requests and + maintain access to protected features. Authentication sessions + may also be associated with an active WebSocket connection + while you are using multiplayer features. +

+
+ +
+

+ 6. Data Retention +

+

+ Account information and game-related statistics may be retained + for as long as necessary to provide the application's features. + Session-related information is removed or invalidated when it + is no longer required. +

+
+ +
+

+ 7. Data Security +

+

+ We take reasonable technical measures to protect account and + game data against unauthorized access, modification or + disclosure. Passwords are not stored in plain text. + Authentication and sensitive operations are protected by + appropriate security mechanisms. +

+
+ +
+

+ 8. Your Rights +

+

+ Depending on applicable data protection laws, you may have + rights concerning your personal information, including the + right to access, correct or request deletion of your data. +

+
+ +
+

+ 9. Contact +

+

+ If you have questions about this Privacy Policy or the handling + of your personal information, please contact the Culture Quiz + project team. +

+
+ +
+ +
+
+
+ ); +} diff --git a/frontend/src/app/pages/TermsOfService.tsx b/frontend/src/app/pages/TermsOfService.tsx new file mode 100644 index 0000000..17c8ca4 --- /dev/null +++ b/frontend/src/app/pages/TermsOfService.tsx @@ -0,0 +1,136 @@ +import { useNavigate } from "react-router-dom"; + +export default function TermsOfService() { + const navigate = useNavigate(); + + return ( +
+
+

Terms of Service

+ +

+ Last updated: August 2026 +

+ +
+

+ 1. About the Service +

+

+ Culture Quiz is a multiplayer quiz game that allows users + to create an account, play matches against other players or + AI opponents, participate in tournaments and view game + statistics and leaderboards. +

+
+ +
+

+ 2. User Accounts +

+

+ You are responsible for the information associated with your + account and for keeping your authentication credentials secure. + You must not attempt to access another user's account or + impersonate another user. +

+
+ +
+

+ 3. Fair Play +

+

+ Users are expected to participate fairly and respectfully. + Attempts to manipulate matches, matchmaking, tournaments, + scores or other game systems are not permitted. +

+
+ +
+

+ 4. Multiplayer and Tournaments +

+

+ Multiplayer matches and tournaments may depend on real-time + connections. Disconnecting from a match may result in a + forfeit according to the game's rules. +

+
+ +
+

+ 5. Prohibited Use +

+

+ Users must not: +

+
    +
  • Attempt to compromise the application's security.
  • +
  • Interfere with other users' games.
  • +
  • + Exploit bugs or vulnerabilities to gain an unfair advantage. +
  • +
  • Use automated systems to abuse the service.
  • +
  • + Attempt unauthorized access to application data or accounts. +
  • +
+
+ +
+

+ 6. Game Content and Statistics +

+

+ Game results, scores, rankings and statistics may be displayed + to other users as part of the application's multiplayer and + leaderboard features. +

+
+ +
+

+ 7. Availability +

+

+ Culture Quiz is provided as a project and may occasionally + be unavailable because of maintenance, technical problems or + other circumstances. We do not guarantee uninterrupted access + to the service. +

+
+ +
+

+ 8. Changes to the Service +

+

+ The game, its features and its rules may be modified, + improved or discontinued as the project evolves. +

+
+ +
+

+ 9. Acceptance +

+

+ By using Culture Quiz, you agree to comply with these + Terms of Service and to use the application responsibly + and fairly. +

+
+ +
+ +
+
+
+ ); +}