diff --git a/app/(interactive)/matches/[slug]/page.js b/app/(interactive)/matches/[slug]/page.js
index f95e1f6..1072ff8 100644
--- a/app/(interactive)/matches/[slug]/page.js
+++ b/app/(interactive)/matches/[slug]/page.js
@@ -119,10 +119,10 @@ const MatchPage = () => {
setFilterList(updatedFilterList);
};
- const scrollToDetailedList=()=>{
+ const scrollToDetailedList = () => {
if (tableRef.current) {
tableRef.current.scrollIntoView({ behavior: "smooth" });
- }
+ }
};
const togglePDF = () => {
@@ -140,7 +140,7 @@ const MatchPage = () => {
{/* Main Content Area */}
{matchData && (
<>
-
+
{matchData.name}
@@ -213,29 +213,29 @@ const MatchPage = () => {
{/* Points List */}
- scrollToDetailedList()}>View Detailed List
-
+
scrollToDetailedList()}>View Detailed List
+
{/* Score display */}
-
+
-
togglePDF()} className={showPDF ? styles.toggle_buttona_inactive : styles.toggle_buttona_active}>Points
-
togglePoints()} className={showPDF ? styles.toggle_buttonb_active : styles.toggle_buttonb_inactive}>Key Stats & Visuals
+
togglePDF()} className={showPDF ? styles.toggle_buttona_inactive : styles.toggle_buttona_active}>Points
+
togglePoints()} className={showPDF ? styles.toggle_buttonb_active : styles.toggle_buttonb_inactive}>Key Stats & Visuals
{showPDF ? (
) : (
-
+
- )}
+ )}
>
)}
diff --git a/app/(interactive)/tag-match/[slug]/page.js b/app/(interactive)/tag-match/[slug]/page.js
index 3a9696b..4a7d9a9 100644
--- a/app/(interactive)/tag-match/[slug]/page.js
+++ b/app/(interactive)/tag-match/[slug]/page.js
@@ -53,6 +53,7 @@ export default function TagMatch() {
}
// Set the metadata to matchDocument but without the 'points'
+ // eslint-disable-next-line no-unused-vars
const { points, ...metadata } = matchDocument;
setMatchMetadata(metadata);
});
@@ -362,7 +363,7 @@ export default function TagMatch() {
console.log("event: ", event);
const courtWidthInInches = 432; // The court is 36 feet wide, or 432 inches
// const courtHeightInInches = 936; // The court is 78 feet long, or 936 inches
-
+
// The current SVG has the actual in width of the court as 360 out of 600 total
// The height is 780 out of 1080 total
// This makes the ratio 0.6 for width and 0.7222 for height
@@ -419,19 +420,19 @@ export default function TagMatch() {
{button.label}
{
- setPopUp([])
- saveToHistory();
- let data = matchMetadata;
- // add data.x and data.y to the data object
- const { x, y } = handleImageClick(event);
- data.x = x;
- data.y = y;
- data.table = tableState.rows;
- data.activeRowIndex = tableState.activeRowIndex;
- data.videoTimestamp = getVideoTimestamp();
- button.action(data);
- showPopUp();
- }} />
+ setPopUp([])
+ saveToHistory();
+ let data = matchMetadata;
+ // add data.x and data.y to the data object
+ const { x, y } = handleImageClick(event);
+ data.x = x;
+ data.y = y;
+ data.table = tableState.rows;
+ data.activeRowIndex = tableState.activeRowIndex;
+ data.videoTimestamp = getVideoTimestamp();
+ button.action(data);
+ showPopUp();
+ }} />
) : (
{
diff --git a/app/components/ExtendedList.js b/app/components/ExtendedList.js
index c68f100..52fae65 100644
--- a/app/components/ExtendedList.js
+++ b/app/components/ExtendedList.js
@@ -1,4 +1,4 @@
-import React, { useEffect, useState} from "react";
+import React, { useEffect, useState } from "react";
import styles from '../styles/ExtendedList.module.css';
import getTeams from '@/app/services/getTeams.js';
import Winner from '../../public/Winner.js';
@@ -7,89 +7,89 @@ import DoubleFault from "../../public/DoubleFault";
import PlayButton from "../../public/PlayButton";
const ExtendedList = ({ pointsData, clientTeam, opponentTeam, onPointSelect, iframe }) => {
- const [client_logo, setClientLogo] = useState('');
- const [opponent_logo, setOpponentLogo] = useState('');
+ const [client_logo, setClientLogo] = useState('');
+ const [opponent_logo, setOpponentLogo] = useState('');
- useEffect(() => {
- const fetchLogos = async () => {
- try {
- const allTeams = await getTeams();
- const clientLogoURL = allTeams.find((team) => team.name === clientTeam).logoUrl;
- const opponentLogoURL = allTeams.find((team) => team.name === opponentTeam).logoUrl;
- setClientLogo(clientLogoURL);
- setOpponentLogo(opponentLogoURL);
- } catch (error) {
- console.error('Error fetching data:', error);
- }
- };
-
- fetchLogos();
- });
- let keys = ["", "serverName", "setScore", "gameScore", "pointScore", "pointWonBy", "lastShotResult", "rallyCount"];
- let keys_headers = ["Server", "", "Set Score", "Game Score", "Point", "Point Winner", "Last Shot Type", "Shot Count", ""];
+ useEffect(() => {
+ const fetchLogos = async () => {
+ try {
+ const allTeams = await getTeams();
+ const clientLogoURL = allTeams.find((team) => team.name === clientTeam).logoUrl;
+ const opponentLogoURL = allTeams.find((team) => team.name === opponentTeam).logoUrl;
+ setClientLogo(clientLogoURL);
+ setOpponentLogo(opponentLogoURL);
+ } catch (error) {
+ console.error('Error fetching data:', error);
+ }
+ };
+ fetchLogos();
+ });
+ let keys = ["", "serverName", "setScore", "gameScore", "pointScore", "pointWonBy", "lastShotResult", "rallyCount"];
+ let keys_headers = ["Server", "", "Set Score", "Game Score", "Point", "Point Winner", "Last Shot Type", "Shot Count", ""];
- const Scroll=(point)=>{
- // useref
- onPointSelect(point.Position);
- if (iframe.current) {
- iframe.current.scrollIntoView({ behavior: "smooth" });
- }
+
+ const Scroll = (point) => {
+ // useref
+ onPointSelect(point.Position);
+ if (iframe.current) {
+ iframe.current.scrollIntoView({ behavior: "smooth" });
}
+ }
+
+ return (
+
+
+
+
+ {keys_headers.map((key, index) => (
+ {key}
+ ))}
+
+
+
+ {pointsData.map((item, rowIndex) => (
+
+ {keys.map((key, cellIndex) => (
+
+ {cellIndex === 0 ? (
+
+ ) : (
+
+ {cellIndex === keys.length - 2 ? (
+ <>
+ {item['lastShotResult'] === 'Winner' && (
+
+ )}
+ {item['lastShotResult'] === 'Error' && (
+
+
+ )}
+ {item['lastShotResult'] === 'DoubleFault' && (
+
- return (
-
-
-
-
- {keys_headers.map((key, index) => (
- {key}
- ))}
-
-
-
- {pointsData.map((item, rowIndex) => (
-
- {keys.map((key, cellIndex) => (
-
- {cellIndex === 0 ? (
-
- ) : (
-
- {cellIndex === keys.length - 2 ? (
- <>
- {item['lastShotResult'] === 'Winner' && (
-
- )}
- {item['lastShotResult'] === 'Error' && (
-
-
- )}
- {item['lastShotResult'] === 'DoubleFault' && (
-
-
- )}
- {item['lastShotResult']}
- >
- ) : (
- item[key]
- )}
-
- )}
-
- ))}
+ )}
+ {item['lastShotResult']}
+ >
+ ) : (
+ item[key]
+ )}
+
+ )}
+
+ ))}
-
- Scroll(item)}>
-
-
-
-
- ))}
-
-
-
- );
+
+ Scroll(item)}>
+
+
+
+
+ ))}
+
+
+
+ );
};
export default ExtendedList;
diff --git a/app/components/PointsList.js b/app/components/PointsList.js
index 2469c1e..228da14 100644
--- a/app/components/PointsList.js
+++ b/app/components/PointsList.js
@@ -3,7 +3,6 @@ import styles from '../styles/PointsList.module.css';
import getTeams from '@/app/services/getTeams.js';
const PointsList = ({ pointsData, onPointSelect, clientTeam, opponentTeam }) => {
- const [expanded, setExpanded] = useState(false);
const [clientLogo, setClientLogo] = useState('');
const [opponentLogo, setOpponentLogo] = useState('');
@@ -66,40 +65,9 @@ const PointsList = ({ pointsData, onPointSelect, clientTeam, opponentTeam }) =>
{set}
{gameScore}
{pointScore}
-
- {/*
-
-
-
-
-
-
-
-
- */}
-
);
})}
-
- {/* {!expanded && pointsData.length > 4 && (
-
-
-
- setExpanded(true)}>Expand
-
-
-
- )}
- {expanded && (
-
-
-
- setExpanded(false)}>Collapse
-
-
-
- )} */}
diff --git a/app/components/TennisCourtSVG.js b/app/components/TennisCourtSVG.js
index 48322e5..92c1c78 100644
--- a/app/components/TennisCourtSVG.js
+++ b/app/components/TennisCourtSVG.js
@@ -7,64 +7,64 @@ const TennisCourtSVG = ({ handleImageClick, courtType }) => {
- {/* Top half of the court */}
-
-
-
-
-
-
- {/* Bottom half of the court, mirrored from the top half */}
-
-
-
-
-
-
- {/* Optional service sections top half */}
- {/* Optional service sections bottom half */}
- {(courtType === 'serve') && (
- <>
-
-
-
-
-
-
-
-
-
-
-
-
-
- >
- )}
-
- {/* T lines and center lines */}
-
-
-
-
-
- {/* Alley lines */}
-
-
-
-
-
- {/* Outside alley lines */}
-
-
-
-
-
- {/* Top and Bottom lines */}
-
-
-
- {/* Net Line */}
-
+ {/* Top half of the court */}
+
+
+
+
+
+
+ {/* Bottom half of the court, mirrored from the top half */}
+
+
+
+
+
+
+ {/* Optional service sections top half */}
+ {/* Optional service sections bottom half */}
+ {(courtType === 'serve') && (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ )}
+
+ {/* T lines and center lines */}
+
+
+
+
+
+ {/* Alley lines */}
+
+
+
+
+
+ {/* Outside alley lines */}
+
+
+
+
+
+ {/* Top and Bottom lines */}
+
+
+
+ {/* Net Line */}
+