Skip to content

Commit

Permalink
fixed indentation for the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
awest25 committed Apr 13, 2024
1 parent 740fca8 commit 68e712d
Show file tree
Hide file tree
Showing 4 changed files with 2,455 additions and 2,569 deletions.
90 changes: 45 additions & 45 deletions app/(interactive)/matches/[slug]/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import nameMap from '../../../services/nameMap';
// export async function generateStaticParams() {
// const querySnapshot = await getDocs(collection(db, 'matches'));
// const matches = querySnapshot.docs.map((doc) => doc.data());

// return matches.map((match) => ({
// slug: match.slug,
// }))
Expand All @@ -29,7 +29,7 @@ const MatchPage = () => {
const [matchData, setMatchData] = useState();
const [filterList, setFilterList] = useState([]);
const [videoObject, setVideoObject] = useState(null);
const [showOptions, setShowOptions] = useState(false);
// const [showOptions, setShowOptions] = useState(false);
const [showPercent, setShowPercent] = useState(false);
const [showCount, setShowCount] = useState(false);
const [playingPoint, setPlayingPoint] = useState(null);
Expand Down Expand Up @@ -57,7 +57,7 @@ const MatchPage = () => {
console.error('Error fetching data:', error);
}
};

fetchData(); // Call the fetchData function when the component mounts or when videoId changes
}, []);

Expand Down Expand Up @@ -98,7 +98,7 @@ const MatchPage = () => {
});

filterMap.forEach((values, key) => {
filteredPoints = filteredPoints.filter(point =>
filteredPoints = filteredPoints.filter(point =>
values.length > 1 ? values.includes(point[key]) : point[key] === values[0]
);
});
Expand All @@ -119,7 +119,7 @@ const MatchPage = () => {
{/* Main Content Area */}
{matchData && (
<>
<MatchTiles matchName={matchData.name} finalScore={matchData.points} clientTeam={matchData.clientTeam} opponentTeam={matchData.opponentTeam} matchDetails={matchData.matchDetails}/>
<MatchTiles matchName={matchData.name} finalScore={matchData.points} clientTeam={matchData.clientTeam} opponentTeam={matchData.opponentTeam} matchDetails={matchData.matchDetails} />
<div className={styles.headerRow}>
<div className={styles.titleContainer}>
<h2>{matchData.name}</h2>
Expand All @@ -129,17 +129,17 @@ const MatchPage = () => {
{/* Video Player */}
<div className="videoPlayer">
<div>
<VideoPlayer videoId={matchData.videoId} setVideoObject={setVideoObject}/>
<VideoPlayer videoId={matchData.videoId} setVideoObject={setVideoObject} />
</div>
{/* Score display */}
<div className="scoreboard">
<ScoreBoard names={matchData.name} playData={playingPoint}/>
<ScoreBoard names={matchData.name} playData={playingPoint} />
</div>
</div>
<div>
{/* Filter List */}
<div className={filterStyles.activeFilterListContainer}>
Active Filters:
Active Filters:
<ul className={filterStyles.activeFilterList}>
{sortedFilterList.map(([key, value]) => (
<li className={filterStyles.activeFilterItem} key={`${key}-${value}`} style={{ cursor: 'pointer' }} onClick={() => removeFilter(key, value)}>
Expand All @@ -153,43 +153,43 @@ const MatchPage = () => {
{/* Filter List */}
<div className="filterList">
{/* Radio Options */}
<div className={filterStyles.optionsList}>
<div>
<input
type="radio"
id="defaultRadio"
checked={!showCount && !showPercent}
onChange={() => {
setShowPercent(false);
setShowCount(false);
}}
/>
<label htmlFor="defaultRadio">Default</label>
</div>
<div>
<input
type="radio"
id="percentRadio"
checked={showPercent}
onChange={() => {
setShowPercent(true);
setShowCount(false);
}}
/>
<label htmlFor="percentRadio">Show Percent</label>
</div>
<div>
<input
type="radio"
id="countRadio"
checked={showCount}
onChange={() => {
setShowPercent(false);
setShowCount(true);
}}
/>
<label htmlFor="countRadio">Show Count</label>
</div>
<div className={filterStyles.optionsList}>
<div>
<input
type="radio"
id="defaultRadio"
checked={!showCount && !showPercent}
onChange={() => {
setShowPercent(false);
setShowCount(false);
}}
/>
<label htmlFor="defaultRadio">Default</label>
</div>
<div>
<input
type="radio"
id="percentRadio"
checked={showPercent}
onChange={() => {
setShowPercent(true);
setShowCount(false);
}}
/>
<label htmlFor="percentRadio">Show Percent</label>
</div>
<div>
<input
type="radio"
id="countRadio"
checked={showCount}
onChange={() => {
setShowPercent(false);
setShowCount(true);
}}
/>
<label htmlFor="countRadio">Show Count</label>
</div>
</div>
<FilterList pointsData={matchData.points} filterList={filterList} setFilterList={setFilterList} showPercent={showPercent} showCount={showCount} />
</div>
Expand Down
Loading

0 comments on commit 68e712d

Please sign in to comment.