Changed components folder to screens
This commit is contained in:
parent
3472b2ce8e
commit
662a530d89
5 changed files with 3 additions and 3 deletions
60
frontend/src/screens/JoinStation.jsx
Normal file
60
frontend/src/screens/JoinStation.jsx
Normal file
|
@ -0,0 +1,60 @@
|
|||
import React, { useState } from 'react';
|
||||
|
||||
function JoinStation() {
|
||||
const [verifyMethod, setVerifyMethod] = useState('');
|
||||
const [password, setPassword] = useState('');
|
||||
|
||||
const handleJoinStation = () => {
|
||||
console.log('Joining station with password:', password);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="join-station">
|
||||
<header className="join-station-header">
|
||||
<h1>Join a Station on Serena</h1>
|
||||
</header>
|
||||
|
||||
<main className="join-station-content">
|
||||
<div className="verify-method-section">
|
||||
<h2>How would you like to verify access?</h2>
|
||||
|
||||
<div className="radio-option">
|
||||
<label>
|
||||
<input
|
||||
type="radio"
|
||||
name="verifyMethod"
|
||||
value="password"
|
||||
checked={verifyMethod === 'password'}
|
||||
onChange={(e) => setVerifyMethod(e.target.value)}
|
||||
/>
|
||||
Password
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{verifyMethod === 'password' && (
|
||||
<div className="password-input-section">
|
||||
<label htmlFor="station-password">Station Password:</label>
|
||||
<input
|
||||
type="password"
|
||||
id="station-password"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
placeholder="Enter station password"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<button
|
||||
className="join-station-final-btn"
|
||||
onClick={handleJoinStation}
|
||||
disabled={verifyMethod !== 'password' || !password.trim()}
|
||||
>
|
||||
Join Station
|
||||
</button>
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default JoinStation;
|
Loading…
Add table
Add a link
Reference in a new issue