diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..2ba986f6f --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/Eve-fests_web/Frontend_Eve-fests/React4Frontend b/Eve-fests_web/Frontend_Eve-fests/React4Frontend new file mode 100644 index 000000000..f7dc2ae2a --- /dev/null +++ b/Eve-fests_web/Frontend_Eve-fests/React4Frontend @@ -0,0 +1,70 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import './index.css'; +import App from './App'; +import reportWebVitals from './reportWebVitals'; + +var element = React.createElement('h1', { className: 'greeting' }, 'Hello, world!'); +ReactDOM.render(element, document.getElementById('root')); + +reportWebVitals(); + +import React, { useState } from 'react'; + +function App() { + const [isRegistering, setIsRegistering] = useState(true); + const [email, setEmail] = useState(''); + const [password, setPassword] = useState(''); + const [loggedInUser, setLoggedInUser] = useState(null); + + const handleToggleMode = () => { + setIsRegistering(!isRegistering); + }; + + const handleAuth = () => { + if (isRegistering) { + // Simulated user registration + console.log('User registered with email:', email); + } else { + // Simulated user login + console.log('User logged in with email:', email); + setLoggedInUser(email); // Set the user's email as the logged-in user + } + }; + + return ( +
+

Eve-fests

+ {loggedInUser ? ( +
+

Welcome, {loggedInUser}!

+ +
+ ) : ( +
+

{isRegistering ? 'Register' : 'Log In'}

+ setEmail(e.target.value)} + /> + setPassword(e.target.value)} + /> + +

+ {isRegistering ? 'Already have an account? Log in' : 'Don\'t have an account? Register'} +

+
+ )} +
+ ); +} + +export default App; diff --git a/README.md b/README.md index d6191dd92..5b3c5a8e2 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,10 @@ # Project Name Long Description about project. This project do that. This project is awesome... ## Team members -1. Name [Embed personal github URL] -2. Name [Embed perosnal github URL] +1. Bhagyasree Kishore Menon [Embed personal github URL] +2. Arya Krishna [Embed perosnal github URL] +3. Diya Bhatt A [Embed perosnal github URL] +4. Gayatri K B [Embed perosnal github URL] ## Team Id Team id here ## Link to product walkthrough diff --git a/Reactproject123/Reactapp b/Reactproject123/Reactapp new file mode 100644 index 000000000..f32176acb --- /dev/null +++ b/Reactproject123/Reactapp @@ -0,0 +1,3 @@ +npx create-react-app my-react-app +cd my-react-app +npm start