@@ -34,7 +34,6 @@ type ApiError = {
3434 message : string ;
3535} ;
3636
37-
3837function ScoreSection ( { teamId } : { teamId : string } ) {
3938 const [ design , setDesign ] = useState ( 0 ) ;
4039 const [ implementation , setImplementation ] = useState ( 0 ) ;
@@ -44,7 +43,7 @@ function ScoreSection({ teamId }: { teamId: string }) {
4443 const [ comment , setComment ] = useState ( "" ) ;
4544 const [ editMode , setEditMode ] = useState ( false ) ;
4645 const [ currentScoreId , setCurrentScoreId ] = useState < string | null > ( null ) ;
47-
46+
4847 const queryClient = useQueryClient ( ) ;
4948 const { create } = useToast ( ) ;
5049 const {
@@ -59,9 +58,9 @@ function ScoreSection({ teamId }: { teamId: string }) {
5958 staleTime : 0 ,
6059 } ) ;
6160 const [ round , setRound ] = useState ( scores . length ) ;
62- useEffect ( ( ) => {
63- setRound ( scores . length )
64- } , [ scores ] )
61+ useEffect ( ( ) => {
62+ setRound ( scores . length ) ;
63+ } , [ scores ] ) ;
6564 const createScoreMutation = useMutation ( {
6665 mutationFn : ( {
6766 teamId,
@@ -258,15 +257,15 @@ function ScoreSection({ teamId }: { teamId: string }) {
258257 < div className = "mt-8" >
259258 < h2 className = "mb-4 text-xl font-bold" > Team Scores</ h2 >
260259
261- { (
260+ {
262261 < div className = "mb-4 space-y-4 rounded-lg bg-gray-900 p-4" >
263262 < h3 className = "text-lg font-semibold" >
264263 { editMode ? "Edit Score" : "Add Score" }
265- < p className = "text-red-500 text-sm " > score can range from 0-10</ p >
264+ < p className = "text-sm text-red-500 " > score can range from 0-10</ p >
266265 </ h3 >
267266 < div className = "grid grid-cols-2 gap-4" >
268267 < div className = "space-y-2" >
269- < Label > Design</ Label >
268+ < Label > UI & Design </ Label >
270269 < Input
271270 type = "number"
272271 min = "0"
@@ -276,7 +275,7 @@ function ScoreSection({ teamId }: { teamId: string }) {
276275 />
277276 </ div >
278277 < div className = "space-y-2" >
279- < Label > Implementation</ Label >
278+ < Label > Technical Implementation</ Label >
280279 < Input
281280 type = "number"
282281 min = "0"
@@ -286,7 +285,7 @@ function ScoreSection({ teamId }: { teamId: string }) {
286285 />
287286 </ div >
288287 < div className = "space-y-2" >
289- < Label > Presentation</ Label >
288+ < Label > Presentation & Communication </ Label >
290289 < Input
291290 type = "number"
292291 min = "0"
@@ -296,7 +295,7 @@ function ScoreSection({ teamId }: { teamId: string }) {
296295 />
297296 </ div >
298297 < div className = "space-y-2" >
299- < Label > Innovation</ Label >
298+ < Label > Innovation & Creativity </ Label >
300299 < Input
301300 type = "number"
302301 min = "0"
@@ -305,7 +304,7 @@ function ScoreSection({ teamId }: { teamId: string }) {
305304 onChange = { ( e ) => setInnovation ( Number ( e . target . value ) ) }
306305 />
307306 </ div >
308- < div className = "space-y-2" >
307+ { /* <div className="space-y-2">
309308 <Label>Teamwork</Label>
310309 <Input
311310 type="number"
@@ -314,15 +313,15 @@ function ScoreSection({ teamId }: { teamId: string }) {
314313 value={teamwork}
315314 onChange={(e) => setTeamwork(Number(e.target.value))}
316315 />
317- </ div >
316+ </div> */ }
318317 < div className = "space-y-2" >
319318 < Label > Round</ Label >
320319 < Input
321320 type = "number"
322321 min = "0"
323322 disabled
324323 max = "10"
325- value = { scores . length }
324+ value = { scores . length }
326325 // onChange={(e) => setRound(Number(e.target.value))}
327326 />
328327 </ div >
@@ -359,7 +358,7 @@ function ScoreSection({ teamId }: { teamId: string }) {
359358 ) }
360359 </ div >
361360 </ div >
362- ) }
361+ }
363362
364363 { scores &&
365364 scores . length > 0 &&
@@ -374,7 +373,7 @@ function ScoreSection({ teamId }: { teamId: string }) {
374373 Total Score: { calculateTotalScore ( score ) }
375374 </ div >
376375 < div className = "space-x-2" >
377- { /*
376+ { /*
378377 <Button
379378 size="sm"
380379 variant="destructive"
@@ -385,11 +384,11 @@ function ScoreSection({ teamId }: { teamId: string }) {
385384 </ div >
386385 </ div >
387386 < div className = "grid grid-cols-3 gap-4" >
388- < div > Design: { score . design } </ div >
389- < div > Implementation: { score . implementation } </ div >
390- < div > Presentation: { score . presentation } </ div >
391- < div > Innovation: { score . innovation } </ div >
392- < div > Teamwork: { score . teamwork } </ div >
387+ < div > UI & Design : { score . design } </ div >
388+ < div > Technical Implementation : { score . implementation } </ div >
389+ < div > Presentation & Communication : { score . presentation } </ div >
390+ < div > Innovation & Creativity : { score . innovation } </ div >
391+ { /* <div>Teamwork: {score.teamwork}</div> */ }
393392 < div > Round: { score . round } </ div >
394393 </ div >
395394 { score . comment && (
@@ -477,9 +476,13 @@ export default function TheTeam() {
477476 return (
478477 < >
479478 < div className = "mx-auto w-[100%] space-y-4" >
480- < Button variant = "outline" size = "icon" onClick = { ( ) => {
481- router . push ( "/teams" )
482- } } >
479+ < Button
480+ variant = "outline"
481+ size = "icon"
482+ onClick = { ( ) => {
483+ router . push ( "/teams" ) ;
484+ } }
485+ >
483486 < ChevronLeft />
484487 </ Button >
485488 { id && < ScoreSection teamId = { String ( id ) } /> }
0 commit comments