-
-
BSA | Tennis Consulting
-
-
- {!authUser && (
-
// Show Sign In button
+ {/* STATIC NAVBAR: FOR SIGNIN */}
+
+
+
+
BSA | Tennis Consulting
+
+ {!showSignIn ? (
+
+ ) : (
+
)}
-
-
BRUIN
- SPORTS
- ANALYTICS
-
-
-
Empowering Tennis Excellence
-
through Data-Driven Insights
-
-
-
-
-
-
-
-
-
-
-
-
- >
- ) : (
-
- )}
+
+
+ {/* show LandingPage or SignIn Page */}
+ {!showSignIn ?
:
}
)
}
+
+export default LandingPage
diff --git a/app/components/MatchTiles.js b/app/components/MatchTiles.js
index 0d6b7fe..d2340f2 100644
--- a/app/components/MatchTiles.js
+++ b/app/components/MatchTiles.js
@@ -1,5 +1,6 @@
import React, { useEffect, useState } from 'react'
-import styles from '../styles/MatchTiles.module.css'
+
+import styles from '@/app/styles/MatchTiles.module.css'
import getTeams from '@/app/services/getTeams.js'
// Calculate winner of match
@@ -16,7 +17,7 @@ const calculateWinner = (player1, player2) => {
}
const MatchTiles = ({
- matchName,
+ // matchName,
clientTeam,
opponentTeam,
matchDetails,
diff --git a/app/components/Navbar.js b/app/components/Navbar.js
new file mode 100644
index 0000000..c7c4c64
--- /dev/null
+++ b/app/components/Navbar.js
@@ -0,0 +1,29 @@
+'use client'
+import Link from 'next/link'
+
+import { useAuth } from '@/app/AuthWrapper'
+import styles from '@/app/styles/Navbar.module.css'
+
+// Navbar is wrapped by Auth: show this when signed in
+const Navbar = () => {
+ const { handleSignOut } = useAuth()
+
+ return (
+
+
+
+
+
+ BSA | Tennis Consulting
+
+
+
+
+
+
+
+
+ )
+}
+
+export default Navbar
diff --git a/app/components/PlayerProfileHeader.js b/app/components/PlayerProfileHeader.js
new file mode 100644
index 0000000..7d61ce8
--- /dev/null
+++ b/app/components/PlayerProfileHeader.js
@@ -0,0 +1,59 @@
+import React from 'react'
+import Image from 'next/image'
+
+import styles from '@/app/styles/PlayerProfileHeader.module.css' // Assuming you have CSS module for styling
+import govinImage from '@/public/images/govin.png'
+import StatBox from '@/app/components/StatBox'
+
+const PlayerProfileHeader = ({ playerData }) => {
+ return (
+
+ {/* Player Basic Information */}
+
+
+
{playerData.name.toUpperCase()}
+
+ Class : {playerData.class} | Height :{' '}
+ {playerData.height}
+ | Age : {playerData.age}
+
+
+ {/* Player Bio */}
+
+
+
+ {/* Win Counters */}
+
+
Filter
+
+
+
+
+
+
+
+
+
+
+ {/* Profile Picture */}
+
+
+
+
+ )
+}
+
+export default PlayerProfileHeader
diff --git a/app/components/PointsList.js b/app/components/PointsList.js
index b79e77f..179d45c 100644
--- a/app/components/PointsList.js
+++ b/app/components/PointsList.js
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react'
-import styles from '../styles/PointsList.module.css'
+import styles from '@/app/styles/PointsList.module.css'
import getTeams from '@/app/services/getTeams.js'
const PointsList = ({
diff --git a/app/components/RosterList.js b/app/components/RosterList.js
index 540ccb9..005e933 100644
--- a/app/components/RosterList.js
+++ b/app/components/RosterList.js
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react'
-import RosterTile from './RosterTile'
-import { db } from '../services/initializeFirebase.js' // Ensure storage is exported from initializeFirebase.js
+import RosterTile from '@/app/components/RosterTile'
+import { db } from '@/app/services/initializeFirebase.js' // Ensure storage is exported from initializeFirebase.js
import { collection, getDocs } from 'firebase/firestore'
const RosterList = () => {
@@ -25,7 +25,7 @@ const RosterList = () => {
}
fetchTeams()
- }, [mensRoster])
+ }, [])
return (
// entire container
diff --git a/app/components/RosterTile.js b/app/components/RosterTile.js
index 43e2378..9deb935 100644
--- a/app/components/RosterTile.js
+++ b/app/components/RosterTile.js
@@ -1,6 +1,6 @@
import React, { useState } from 'react'
-import styles from '../styles/Roster.module.css'
+import styles from '@/app/styles/Roster.module.css'
const RosterTile = ({ firstName, lastName, playerPhoto }) => {
const [playerClicked, setPlayerClicked] = useState(false)
diff --git a/app/components/ScoreBoard.js b/app/components/ScoreBoard.js
index 3cebd19..f31ece2 100644
--- a/app/components/ScoreBoard.js
+++ b/app/components/ScoreBoard.js
@@ -24,11 +24,11 @@ const ScoreBoard = ({
const [localPlayData, setLocalPlayData] = useState(playData);
- useEffect(() => { //smooth transition effect when scores change
+ useEffect(() => {
if (playData) {
const timeout = setTimeout(() => {
setLocalPlayData(playData);
- }, 100);
+ }, 500);
return () => clearTimeout(timeout);
}
}, [playData]);
@@ -55,7 +55,7 @@ const ScoreBoard = ({
key={index}
style={{
position: 'relative',
- opacity: score.score > player2FinalScores[index]?.score ? '100%' : '40%'
+ opacity: score.score > player2FinalScores[index].score ? 1 : 0.4
}}
>
{player1TieScores[index] ? (
@@ -80,9 +80,7 @@ const ScoreBoard = ({
) : null
)}
-
{player1GameScore} |
+
{player1GameScore} |
{pointScore ? player1PointScore : player1TiebreakScore}
@@ -97,7 +95,7 @@ const ScoreBoard = ({
key={index}
style={{
position: 'relative',
- opacity: score.score > player2FinalScores[index]?.score ? '100%' : '40%'
+ opacity: score.score > player1FinalScores[index].score ? 1 : 0.4
}}
>
{player2TieScores[index] ? (
@@ -121,9 +119,7 @@ const ScoreBoard = ({
|
) : null
)}
-
{player2GameScore} |
+
{player2GameScore} |
{pointScore ? player2PointScore : player2TiebreakScore}
diff --git a/app/components/SignIn.js b/app/components/SignIn.js
index 2f1a33b..30573c7 100644
--- a/app/components/SignIn.js
+++ b/app/components/SignIn.js
@@ -1,16 +1,12 @@
-// components/SignIn.js
import React, { useState } from 'react'
import { getAuth, signInWithEmailAndPassword } from 'firebase/auth'
-import styles from '../styles/SignIn.module.css'
-import { useAuth } from './AuthWrapper'
+import styles from '@/app/styles/SignIn.module.css'
-const SignInPage = () => {
+const SignIn = () => {
const [credentials, setCredentials] = useState({ username: '', password: '' })
const [error, setError] = useState(null)
- const { authUser, userProfile, handleSignOut } = useAuth() // Use useAuth hook to get the user and sign-out function
console.log(error)
- console.log(userProfile)
const handleSignIn = async (e) => {
e.preventDefault()
@@ -32,18 +28,6 @@ const SignInPage = () => {
return (
-
-
- BSA | Tennis Consulting
-
-
- {authUser ? (
-
- ) : (
-
- )}
-
-
|