diff --git a/README.md b/README.md index d20ca59..8e259de 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ -# SafeForest - Cybersecurity Education Game +# BeSafe Hackathon 2026 馃弳 2nd Place Winner ## QueenB X AppsFlyer - BeSafe Hackathon 2026 +### SafeForest - Cybersecurity Education Game **SafeForest** is an interactive 3D educational cybersecurity game designed to teach digital safety and online security concepts through engaging gameplay. diff --git a/client/.gitignore b/client/.gitignore index 981208c..351b7a9 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -1,13 +1,8 @@ -# 讗诇 转注诇讬 讗转 拽讜讘抓 讛住讘讬讘讛 注诐 讛诪驻转讞 诇讙讬讟讛讗讘 .env # Logs logs *.log npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* node_modules dist @@ -19,8 +14,4 @@ dist-ssr !.vscode/extensions.json .idea .DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? + diff --git a/client/src/pages/Login.jsx b/client/src/pages/Login.jsx index 0f9a716..491570f 100644 --- a/client/src/pages/Login.jsx +++ b/client/src/pages/Login.jsx @@ -11,10 +11,8 @@ const Login = ({ onClose, onLoginSuccess }) => { const navigate = useNavigate(); const { handleLogin } = useContext(GameContext); - // Check if Google OAuth is available const hasGoogleAuth = Boolean(import.meta.env.VITE_GOOGLE_CLIENT_ID); - // Always call the hook, but conditionally use it const googleLogin = useGoogleLogin({ onSuccess: async (tokenResponse) => { try { @@ -38,16 +36,13 @@ const Login = ({ onClose, onLoginSuccess }) => { const userData = serverResponse.data.user; const googlePicture = userInfo.data.picture; - // Store user picture in localStorage if (googlePicture) { localStorage.setItem('userPicture', googlePicture); } - // Call onLoginSuccess if provided (for backward compatibility) if (onLoginSuccess) { onLoginSuccess(userData, googlePicture); } else { - // Otherwise, handle login directly handleLogin(userData); } @@ -58,7 +53,6 @@ const Login = ({ onClose, onLoginSuccess }) => { if (onClose) { onClose(); } else { - // Redirect to game page navigate('/game'); } }, 1000); @@ -117,11 +111,9 @@ const Login = ({ onClose, onLoginSuccess }) => { console.log('馃幃 Guest login:', guestUser); - // Call onLoginSuccess if provided (for backward compatibility) if (onLoginSuccess) { onLoginSuccess(guestUser, ''); } else { - // Otherwise, handle login directly handleLogin(guestUser); } @@ -130,7 +122,6 @@ const Login = ({ onClose, onLoginSuccess }) => { if (onClose) { onClose(); } else { - // Redirect to game page navigate('/game'); } }, 1000); @@ -138,16 +129,13 @@ const Login = ({ onClose, onLoginSuccess }) => { return (
Your Cybersecurity Sanctuary
@@ -158,7 +146,6 @@ const Login = ({ onClose, onLoginSuccess }) => {