-
Notifications
You must be signed in to change notification settings - Fork 0
pre match #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pre match #22
Changes from all commits
53bf771
1ed9e7f
4f5a860
e336f87
0019577
5cfcf20
d9a720d
bb64c54
2308c05
eba415b
74cc9fa
430f2bf
3a24df7
cb96293
cdc1570
364aec4
763e96e
c886852
edd1eb6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| //בס"ד | ||
| import React, { type FC, type Dispatch, type SetStateAction } from "react"; | ||
Check warningCode scanning / ESLint Disallow unused variables Warning
'Dispatch' is defined but never used.
Check warningCode scanning / ESLint Disallow unused variables Warning
'SetStateAction' is defined but never used.
|
||
| import type { TabProps } from "./scouter/pages/ScoutMatch"; | ||
| const MATCH_NUMBER_MAX = 127; | ||
| const TEAM_NUMBER_MAX = 16383; | ||
| const PreMatchTab: FC<TabProps> = ({ currentForm: form, setForm }) => { | ||
| return ( | ||
| <div className="flex flex-col items-center justify-center w-full h-full gap-3 mx-auto"> | ||
| <div className="w-[480px] border-2 border-green-500 rounded-lg p-5 flex flex-col gap-3 py-0 h-15"> | ||
| <div className="flex w-[460px] justify-between items-center text-green-500 pr-[4px] h-50"> | ||
| <div>Scouter Name:</div> | ||
| <input | ||
| type="text" | ||
| className="inputStyle w-[340px] h-full" | ||
| value={form.scouterName} | ||
| onChange={(event) => | ||
| {setForm((prev) => ({ | ||
| ...prev, | ||
| scouterName: event.target.value, | ||
| }))} | ||
| } | ||
| /> | ||
| </div> | ||
| </div> | ||
| <div className="w-[480px] border-2 border-green-500 rounded-lg p-5 flex flex-col gap-3 py-0 h-15"> | ||
| <div className="flex w-[460px] justify-between items-center text-green-500 pr-[4px] h-30"> | ||
| <div>Match Number:</div> | ||
| <input | ||
| type="number" | ||
| className="inputStyle w-[335px] h-full" | ||
| min={0} | ||
| max={MATCH_NUMBER_MAX} | ||
| value={form.match.number} | ||
| onChange={(event) => | ||
| {setForm((prev) => ({ | ||
| ...prev, | ||
| match: { | ||
| ...prev.match, | ||
| number: Number(event.target.value), | ||
| }, | ||
| }))} | ||
| } | ||
| /> | ||
| </div> | ||
| </div> | ||
| <div className="w-[480px] border-2 border-green-500 rounded-lg p-5 flex flex-col gap-3 py-0 h-15"> | ||
| <div className="flex w-[460px] justify-between items-center text-green-500 pr-[4px] h-70"> | ||
| <div>Team Number:</div> | ||
| <input | ||
| type="number" | ||
| className="inputStyle w-[340px] h-full" | ||
| min={0} | ||
| max={TEAM_NUMBER_MAX} | ||
| value={form.teamNumber} | ||
| onChange={(event) => | ||
| {setForm((prev) => ({ | ||
| ...prev, | ||
| teamNumber: Number(event.target.value), | ||
| })) | ||
| }} | ||
| /> | ||
| </div> | ||
| </div> | ||
| <div className="w-[480px] border-2 border-green-500 rounded-lg p-5 flex flex-col gap-3 py-0 h-15"> | ||
| <div className="flex w-[460px] justify-between items-center text-green-500 pr-[4px] h-70"> | ||
| <div>Match Type:</div> | ||
| <select | ||
| className="inputStyle w-[363px] h-full" | ||
| value={form.match.type} | ||
| onChange={(event) => | ||
| {setForm((prev) => ({ | ||
| ...prev, | ||
| match: { | ||
| ...prev.match, | ||
| type: event.target.value as | ||
| | "practice" | ||
| | "qualification" | ||
| | "playoff", | ||
|
Comment on lines
+75
to
+78
Check warningCode scanning / ESLint Disallow type assertions that narrow a type Warning
Unsafe type assertion: type '"practice" | "qualification" | "playoff"' is more narrow than the original type.
|
||
| }, | ||
| })) | ||
| }} | ||
| > | ||
| <option value="practice">Practice</option> | ||
| <option value="qualification">Qualification</option> | ||
| <option value="playoff">Playoff</option> | ||
| </select> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { PreMatchTab }; | ||
YoniKiriaty marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,4 +33,4 @@ const App: FC = () => { | |
| ); | ||
| }; | ||
|
|
||
| export default App; | ||
| export default App; | ||
Check warning
Code scanning / ESLint
Disallow unused variables Warning