Skip to content

Commit

Permalink
Merge pull request #189 from awest25/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Fredenck authored Oct 16, 2024
2 parents cf11ed7 + 5c6543b commit 0cf1c6c
Show file tree
Hide file tree
Showing 66 changed files with 16,941 additions and 6,746 deletions.
14 changes: 9 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@next/next/recommended",
"next/core-web-vitals"
"next/core-web-vitals",
"standard",
"prettier"
],
"plugins": [],
"plugins": ["prettier"],
"rules": {
"indent": ["error", 2]
"prettier/prettier": ["error"]
},
"settings": {
"react": {
"version": "detect"
}
},
"env": {
"es6": true
"es6": true,
"node": true,
"browser": true
}
}
}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 80,
"tabWidth": 2
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll": true, // Auto-fix ESLint issues on save
"source.fixAll.eslint": true // Specific to ESLint
},
"prettier.requireConfig": true,
"eslint.format.enable": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"eslint.alwaysShowStatus": true
}
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# Tennis-Video-Viewer

[![Deploy to Firebase Hosting on merge](https://github.com/awest25/Tennis-Video-Viewer/actions/workflows/firebase-hosting-merge.yml/badge.svg)](https://github.com/awest25/Tennis-Video-Viewer/actions/workflows/firebase-hosting-merge.yml)

A web app focused on tennis match playback integrating with point-level data, supporting filtering the match by point attributes.

# Getting Started

1. Clone the repo
2. Run `npm install` to install dependencies
3. Run `npm run dev` to run the test server
4. Navigate to `localhost:3000` in your browser

# Development Notes

A firestore database was created. A web app was linked in Project Settings -> Apps -> Web App. The config object was copied into the firebaseInit file.

Before uploading a CSV, it must be converted to JSON. Use csvjson.com.
Expand All @@ -23,4 +26,11 @@ Before uploading a CSV, it must be converted to JSON. Use csvjson.com.

1. Navigate to `/upload-match`
2. For the Video ID, use the part after `v=` in the URL
3. The PDF file is optional
3. The PDF file is optional

## Recommended VS Code Extensions

- ESLint
- Prettier

These extensions will automatically format your code on save. The list is configured in `.vscode/extensions.json`.
78 changes: 48 additions & 30 deletions app/(homepage)/page.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,56 @@
import Link from 'next/link';

import SearchDropdown from '../components/SearchDropdown';

import styles from '../styles/Home.module.css'
// app/(homepage)/page.js (Home Component)
'use client'
import React from 'react'
// import Link from 'next/link'
import Dashboard from '../components/Dashboard.js'
// import styles from '../styles/Home.module.css'
// import { useAuth } from '../components/AuthWrapper' // Import useAuth

const Home = () => {
return (
<div className={styles.container}>
<h1 className={styles.title}>
Match Viewer
</h1>
// const { authUser, userProfile, handleSignOut } = useAuth() // Use useAuth hook to get the user and sign-out function

{/* Search Dropdown */}
<div className="searchDropdown">
<SearchDropdown/>
return (
/*
<div>
<div className={styles.titleBar}>
<div className={styles.leftTitle}>
<h1>BSA | Tennis Consulting</h1>
</div>
<div className={styles.rightTitle}>
{authUser ? (
<button onClick={handleSignOut}>Sign Out</button>
) : (
<button>Sign In</button>
)}
</div>
</div>
<div className={styles.container}>
<h1 className={styles.title}>Match Viewer</h1>
{/* Search Dropdown */ /* }
<div className="searchDropdown">
<SearchDropdown />
</div>
{/* Other Links */}
<div className={styles.actionsContainer}>
<p>Or get started by:</p>
<ul>
<li>
<Link href="/upload-match">Uploading a match</Link>
</li>
<li>
<Link href="/upload-team">Adding a Team</Link>
</li>
<li>
<Link href="/tag-match">Tagging a match</Link>
</li>
</ul>
{/* Other Links */ /* }
<div className={styles.actionsContainer}>
<p>Or get started by:</p>
<ul>
<li>
<Link href="/upload-match">Uploading a match</Link>
</li>
<li>
<Link href="/upload-team">Adding a Team</Link>
</li>
<li>
<Link href="/tag-match">Tagging a match</Link>
</li>
</ul>
</div>
</div>
</div>
);
</div> */
<Dashboard />
)
}

export default Home;
export default Home
Loading

0 comments on commit 0cf1c6c

Please sign in to comment.