-
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.
- Loading branch information
1 parent
8d0a0b1
commit 1716467
Showing
32 changed files
with
198 additions
and
42 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.
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.
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.
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.
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.
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.
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.
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
File renamed without changes.
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,13 @@ | ||
import React from 'react'; | ||
import './LeagueAdminPage.css'; | ||
|
||
// Component showing overall league stats and top players | ||
function LeagueAdminPage(){ | ||
return( | ||
<div> | ||
|
||
</div> | ||
) | ||
} | ||
|
||
export default LeagueAdminPage; |
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 |
---|---|---|
@@ -1,3 +1,9 @@ | ||
#create-join-btns { | ||
text-align: center; | ||
} | ||
|
||
#join-team-btn { | ||
display: block; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} |
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 was deleted.
Oops, something went wrong.
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,4 @@ | ||
#join-team-form { | ||
display: block; | ||
text-align: center; | ||
} |
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,44 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import { useDispatch, useSelector } from 'react-redux'; | ||
import './JoinTeam.css'; | ||
|
||
// Component showing details of the league | ||
function JoinTeam(){ | ||
const dispatch = useDispatch(); | ||
const [joinCode, setJoinCode] = useState(""); | ||
const user = useSelector(store=>store.user); | ||
const userLeague = useSelector(store=>store.userLeague); | ||
|
||
const handleSubmit = (e) =>{ | ||
e.preventDefault(); | ||
dispatch({type: "JOIN_TEAM", payload: {user: user, code: joinCode}}); | ||
}; | ||
|
||
const handleChange = (e) => { | ||
setJoinCode(e.target.value); | ||
}; | ||
|
||
// TODO: If join code syntax changes, the maxLength on input needs to be changed as well. | ||
return( | ||
<div> | ||
<img id="landing-logo" src={'./img/corner-pocket_624x624.png'} alt={'logo'}/> | ||
<br/> | ||
<form id="join-team-form" onSubmit={handleSubmit}> | ||
<label htmlFor="code-input">Enter Code (case-sensative)</label> | ||
<br/><br/> | ||
<input | ||
name="code-input" | ||
type="text" | ||
value={joinCode} | ||
onChange={handleChange} | ||
placeholder='Enter Code' | ||
maxLength={6} | ||
></input> | ||
<br/><br/> | ||
<button className='btn'>Join Team</button> | ||
</form> | ||
</div> | ||
) | ||
} | ||
|
||
export default JoinTeam; |
Empty file.
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,35 @@ | ||
import React, { useEffect } from 'react'; | ||
import { useParams } from 'react-router-dom'; | ||
import { useDispatch, useSelector } from 'react-redux'; | ||
import LeagueAdminPage from '../AdminPage/LeagueAdminPage'; | ||
import './LeagueDetails.css'; | ||
|
||
// Component showing details of the league | ||
function LeagueDetails(){ | ||
const dispatch = useDispatch(); | ||
const leagueId = useParams().leagueid; | ||
const user = useSelector(store=>store.user); | ||
const userLeague = useSelector(store=>store.userLeague); | ||
|
||
useEffect(()=>{ | ||
dispatch({type: "FETCH_LEAGUE", payload: {id: leagueId}}); | ||
}, []); | ||
|
||
if (user.id == userLeague.owner_id){ | ||
return( | ||
<div> | ||
<h3>{userLeague.league_name}</h3> | ||
<LeagueAdminPage/> | ||
</div> | ||
) | ||
} | ||
else { | ||
return( | ||
<div> | ||
<h3>{userLeague.league_name}</h3> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default LeagueDetails; |
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
Empty file.
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,13 @@ | ||
import React from 'react'; | ||
import './TeamAdminPage.css'; | ||
|
||
// Component showing overall league stats and top players | ||
function TeamAdminPage(){ | ||
return( | ||
<div> | ||
|
||
</div> | ||
) | ||
} | ||
|
||
export default TeamAdminPage; |
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