-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Frontend new user profile page added and little fixing on login and s… (
#25)
- Loading branch information
1 parent
5259f1e
commit fb0f9ef
Showing
15 changed files
with
543 additions
and
36 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import '../styles/NewUserComponent.css' | ||
|
||
function NewUserComponent() { | ||
return <div className="wrapper"></div> | ||
} | ||
|
||
export default NewUserComponent |
33 changes: 33 additions & 0 deletions
33
frontend/sportsmatch-app/src/components/NewUserGenderComponent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import '../styles/NewUserComponent.css' | ||
|
||
function NewUserGenderComponent() { | ||
return ( | ||
<div className="wrapper"> | ||
<form action=""> | ||
<div className="gender"> | ||
<p>Select your gender</p> | ||
<div className="male-female"> | ||
<a href=""> | ||
<div className="parent-male"> | ||
<img className="img-male" src="./assets/male.png" alt="male" /> | ||
<div className="male"></div> | ||
</div> | ||
</a> | ||
<a href=""> | ||
<div className="parent-female"> | ||
<img | ||
className="img-female" | ||
src="./assets/female.png" | ||
alt="female" | ||
/> | ||
<div className="female"></div> | ||
</div> | ||
</a> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
) | ||
} | ||
|
||
export default NewUserGenderComponent |
22 changes: 22 additions & 0 deletions
22
frontend/sportsmatch-app/src/components/NewUserInputComponent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import '../styles/NewUserComponent.css' | ||
import { FaRegUser, FaRegCalendarAlt } from 'react-icons/fa' | ||
|
||
function NewUserInputComponent() { | ||
return ( | ||
<div className="newUser-wrapper"> | ||
<form action=""> | ||
<h1>Profile</h1> | ||
<div className="newUser-input-box"> | ||
<input type="text" placeholder="Enter Username" required /> | ||
<FaRegUser className="newUser-icon" /> | ||
</div> | ||
<div className="newUser-input-box"> | ||
<input type="text" placeholder="Enter Date of Birth" required /> | ||
<FaRegCalendarAlt className="newUser-icon" /> | ||
</div> | ||
</form> | ||
</div> | ||
) | ||
} | ||
|
||
export default NewUserInputComponent |
15 changes: 15 additions & 0 deletions
15
frontend/sportsmatch-app/src/components/NewUserRegistrationButtonComponent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import '../styles/NewUserComponent.css' | ||
|
||
function NewUserRegistrationButtonComponent() { | ||
return ( | ||
<div className="wrapper"> | ||
<form action=""> | ||
<button className="save" type="submit"> | ||
Save profile | ||
</button> | ||
</form> | ||
</div> | ||
) | ||
} | ||
|
||
export default NewUserRegistrationButtonComponent |
18 changes: 9 additions & 9 deletions
18
frontend/sportsmatch-app/src/components/SignupComponent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
frontend/sportsmatch-app/src/components/SportsButtonComponent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import { useState } from 'react' | ||
import '../styles/NewUserComponent.css' | ||
|
||
function SportsButtonComponent() { | ||
const [selectedButtons, setSelectedButtons] = useState<string[]>([]) | ||
|
||
const handleCheckboxChange = (buttonText: string) => { | ||
if (selectedButtons.includes(buttonText)) { | ||
setSelectedButtons( | ||
selectedButtons.filter((button) => button !== buttonText), | ||
) | ||
} else { | ||
setSelectedButtons([...selectedButtons, buttonText]) | ||
} | ||
} | ||
|
||
return ( | ||
<div className="wrapper"> | ||
<form action=""> | ||
<p>Select your sports</p> | ||
<div className="sports-container"> | ||
<label> | ||
<input | ||
type="checkbox" | ||
className="sports-checkbox" | ||
checked={selectedButtons.includes('Tennis')} | ||
onChange={() => handleCheckboxChange('Tennis')} | ||
/> | ||
<span className="sports-button">🥎 Tennis</span> | ||
</label> | ||
<label> | ||
<input | ||
type="checkbox" | ||
className="sports-checkbox" | ||
checked={selectedButtons.includes('Gym')} | ||
onChange={() => handleCheckboxChange('Gym')} | ||
/> | ||
<span className="sports-button">🏋 Gym</span> | ||
</label> | ||
<label> | ||
<input | ||
type="checkbox" | ||
className="sports-checkbox" | ||
checked={selectedButtons.includes('Golf')} | ||
onChange={() => handleCheckboxChange('Golf')} | ||
/> | ||
<span className="sports-button">🏌🏽 Golf</span> | ||
</label> | ||
<label> | ||
<input | ||
type="checkbox" | ||
className="sports-checkbox" | ||
checked={selectedButtons.includes('Bowling')} | ||
onChange={() => handleCheckboxChange('Bowling')} | ||
/> | ||
<span className="sports-button">🎳 Bowling</span> | ||
</label> | ||
<label> | ||
<input | ||
type="checkbox" | ||
className="sports-checkbox" | ||
checked={selectedButtons.includes('Running')} | ||
onChange={() => handleCheckboxChange('Running')} | ||
/> | ||
<span className="sports-button">🏃 Running</span> | ||
</label> | ||
<label> | ||
<input | ||
type="checkbox" | ||
className="sports-checkbox" | ||
checked={selectedButtons.includes('Bicycle')} | ||
onChange={() => handleCheckboxChange('Bicycle')} | ||
/> | ||
<span className="sports-button">🚴♀️ Bicycle</span> | ||
</label> | ||
<label> | ||
<input | ||
type="checkbox" | ||
className="sports-checkbox" | ||
checked={selectedButtons.includes('Boxing')} | ||
onChange={() => handleCheckboxChange('Boxing')} | ||
/> | ||
<span className="sports-button">🥊 Boxing</span> | ||
</label> | ||
<label> | ||
<input | ||
type="checkbox" | ||
className="sports-checkbox" | ||
checked={selectedButtons.includes('Ping pong')} | ||
onChange={() => handleCheckboxChange('Ping pong')} | ||
/> | ||
<span className="sports-button">🏓 Ping pong</span> | ||
</label> | ||
<button id="more-sports-button">. . .</button> | ||
</div> | ||
</form> | ||
</div> | ||
) | ||
} | ||
|
||
export default SportsButtonComponent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import NewUserComponent from '../components/NewUserComponent' | ||
import NewUserInputComponent from '../components/NewUserInputComponent' | ||
import NewUserGenderComponent from '../components/NewUserGenderComponent' | ||
import SportsButtonComponent from '../components/SportsButtonComponent' | ||
import NewUserRegistrationButtonComponent from '../components/NewUserRegistrationButtonComponent' | ||
import '../styles/NewUserComponent.css' | ||
|
||
export default function NewUser() { | ||
return ( | ||
<div className="wrapper-frame"> | ||
<div className="components-container"> | ||
<NewUserComponent /> | ||
<NewUserInputComponent /> | ||
<NewUserGenderComponent /> | ||
<SportsButtonComponent /> | ||
<NewUserRegistrationButtonComponent /> | ||
</div> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.