import React, { useState } from 'react'; import Settings from './Settings'; // Import the Settings component const Login: React.FC = () => { // State to handle popup visibility const [showPopup, setShowPopup] = useState(false); const [showSignInPopup, setShowSignInPopup] = useState(false); const [isLoggedIn, setIsLoggedIn] = useState(false); const [showSettingsPopup, setShowSettingsPopup] = useState(false); // Credentials state const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [accountName, setAccountName] = useState('Pluto'); // Set the account name // Function to toggle the popup const togglePopup = () => setShowPopup(!showPopup); // Function to toggle the sign-in popup const toggleSignInPopup = () => { setShowSignInPopup(!showSignInPopup); setShowPopup(false); // Hide login popup when opening the sign-in popup }; // Function to handle login const handleLogin = () => { if ((email === 'pluto@imareal.planet' || accountName === 'Pluto') && password === 'fuckTheSun1234') { setIsLoggedIn(true); // Successful login setShowSignInPopup(false); // Close the sign-in popup } else { alert('Incorrect credentials'); } }; // Function to toggle the settings popup const toggleSettingsPopup = () => setShowSettingsPopup(!showSettingsPopup); return (
Already have an account? Sign in {' '} here