Skip to content

Commit d630eb6

Browse files
committed
feat: apps
1 parent dbce690 commit d630eb6

File tree

2 files changed

+23
-37
lines changed

2 files changed

+23
-37
lines changed

src/pages/apps/DiceRollerPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useEffect } from 'react';
1+
import React, { useState } from 'react';
22
import usePageTitle from '../../utils/usePageTitle';
33
import { Link } from 'react-router-dom';
44
import { ArrowLeftIcon } from '@phosphor-icons/react';

src/pages/apps/TournamentBracketPage.js

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,8 @@ function TournamentBracketPage() {
301301
className={`flex items-center gap-2 text-lg font-arvo font-normal px-4 py-2 rounded-md border transition-colors duration-300 ease-in-out
302302
${competitors.length >= 64
303303
? 'bg-gray-600 text-gray-400 cursor-not-allowed'
304-
: `bg-[${colors.app}] text-white hover:bg-[${colors.app}]`
304+
: 'bg-app/50 text-white hover:bg-app/70'
305305
}`}
306-
style={buttonStyle}
307306
disabled={competitors.length >= 64}
308307
>
309308
Add
@@ -332,35 +331,32 @@ function TournamentBracketPage() {
332331
<div className="flex gap-2">
333332
{editingIndex === index ? (
334333
<button onClick={() => saveEdit(index)}
335-
className={`flex items-center gap-2 text-lg font-mono font-normal px-4 py-2 rounded-md border transition-colors duration-300 ease-in-out
334+
className={`flex items-center gap-2 text-lg font-mono font-normal px-4 py-2 rounded-md border transition-colors duration-300 ease-in-out app-button-hover
336335
${false // Save button is never disabled based on current logic
337336
? 'bg-gray-600 text-gray-400 cursor-not-allowed'
338-
: `bg-[${colors.app}] text-white hover:bg-[${colors.app}]`
337+
: 'bg-app/50 text-white hover:bg-app/70'
339338
}`}
340-
style={buttonStyle}
341339
>
342340
Save
343341
</button>
344342
) : (
345343
<button onClick={() => startEditing(index, competitor)}
346-
className={`flex items-center gap-2 text-lg font-mono font-normal px-4 py-2 rounded-md border transition-colors duration-300 ease-in-out
344+
className={`flex items-center gap-2 text-lg font-mono font-normal px-4 py-2 rounded-md border transition-colors duration-300 ease-in-out app-button-hover
347345
${false // Edit button is never disabled based on current logic
348346
? 'bg-gray-600 text-gray-400 cursor-not-allowed'
349-
: `bg-[${colors.app}] text-white hover:bg-[${colors.app}]`
347+
: 'bg-app/50 text-white hover:bg-app/70'
350348
}`}
351-
style={buttonStyle}
352349
>
353350
Edit
354351
</button>
355352
)}
356-
<button onClick={() => deleteCompetitor(index)}
357-
className={`flex items-center gap-2 text-lg font-mono font-normal px-4 py-2 rounded-md border transition-colors duration-300 ease-in-out
358-
${false // Delete button is never disabled based on current logic
359-
? 'bg-gray-600 text-gray-400 cursor-not-allowed'
360-
: `bg-[${colors.app}] text-white hover:bg-[${colors.app}]`
361-
}`}
362-
style={buttonStyle}
363-
>
353+
<button onClick={() => deleteCompetitor(index)}
354+
className={`flex items-center gap-2 text-lg font-mono font-normal px-4 py-2 rounded-md border transition-colors duration-300 ease-in-out app-button-hover
355+
${false // Delete button is never disabled based on current logic
356+
? 'bg-gray-600 text-gray-400 cursor-not-allowed'
357+
: 'bg-app/50 text-white hover:bg-app/70'
358+
}`}
359+
>
364360
Delete
365361
</button>
366362
</div>
@@ -372,12 +368,11 @@ function TournamentBracketPage() {
372368
<div className="mt-8">
373369
<button
374370
onClick={startTournament}
375-
className={`flex items-center gap-2 text-lg font-mono font-normal px-4 py-2 rounded-md border transition-colors duration-300 ease-in-out
371+
className={`flex items-center gap-2 text-lg font-mono font-normal px-4 py-2 rounded-md border transition-colors duration-300 ease-in-out app-button-hover
376372
${competitors.length < 2
377373
? 'bg-gray-600 text-gray-400 cursor-not-allowed'
378-
: `bg-[${colors.app}] text-white hover:bg-[${colors.app}]`
374+
: 'bg-app/50 text-white hover:bg-app/70'
379375
}`}
380-
style={buttonStyle}
381376
disabled={competitors.length < 2}
382377
>
383378
Start Tournament
@@ -459,12 +454,11 @@ function TournamentBracketPage() {
459454
const loser = score1 > score2 ? match[1] : match[0];
460455
advanceWinner(winner, loser, roundIndex, matchIndex);
461456
}}
462-
className={`flex items-center justify-center gap-2 text-lg font-mono font-normal px-4 py-1 rounded-md border transition-colors duration-300 ease-in-out w-full mb-4
457+
className={`flex items-center justify-center gap-2 text-lg font-mono font-normal px-4 py-1 rounded-md border transition-colors duration-300 ease-in-out w-full mb-4 app-button-hover
463458
${advancedMatches[`${roundIndex}-${matchIndex}`] || scores[roundIndex]?.[matchIndex]?.[0] === undefined || scores[roundIndex]?.[matchIndex]?.[1] === undefined || scores[roundIndex]?.[matchIndex]?.[0] === '' || scores[roundIndex]?.[matchIndex]?.[1] === '' || scores[roundIndex]?.[matchIndex]?.[0] === scores[roundIndex]?.[matchIndex]?.[1]
464459
? 'bg-gray-600 text-gray-400 cursor-not-allowed'
465-
: `bg-[${colors.app}] text-white hover:bg-[${colors.app}]`
460+
: 'bg-app/50 text-white hover:bg-app/70'
466461
}`}
467-
style={buttonStyle}
468462
disabled={advancedMatches[`${roundIndex}-${matchIndex}`] || scores[roundIndex]?.[matchIndex]?.[0] === undefined || scores[roundIndex]?.[matchIndex]?.[1] === undefined || scores[roundIndex]?.[matchIndex]?.[0] === '' || scores[roundIndex]?.[matchIndex]?.[1] === '' || scores[roundIndex]?.[matchIndex]?.[0] === scores[roundIndex]?.[matchIndex]?.[1]}
469463
>
470464
{advancedMatches[`${roundIndex}-${matchIndex}`] ? `${advancedMatches[`${roundIndex}-${matchIndex}`].winner} advanced!` : (roundIndex === bracket.length - 1 ? 'Set Champion' : 'Set Winner')}
@@ -484,26 +478,18 @@ function TournamentBracketPage() {
484478
<div className="mt-8 flex gap-4 justify-center">
485479
<button
486480
onClick={resetScores}
487-
className={`flex items-center gap-2 text-lg font-mono font-normal px-4 py-2 rounded-md border transition-colors duration-300 ease-in-out
481+
className={`flex items-center gap-2 text-lg font-mono font-normal px-4 py-2 rounded-md border transition-colors duration-300 ease-in-out app-button-hover
488482
${false // Reset Scores button is never disabled based on current logic
489483
? 'bg-gray-600 text-gray-400 cursor-not-allowed'
490-
: `bg-[${colors.app}] text-white hover:bg-[${colors.app}]`
491-
}`}
492-
style={buttonStyle}
493-
>
494-
Reset Matches
495-
</button>
484+
: 'bg-app/50 text-white hover:bg-app/70'
485+
}`}> Reset Scores </button>
496486
<button
497487
onClick={resetTournament}
498-
className={`flex items-center gap-2 text-lg font-mono font-normal px-4 py-2 rounded-md border transition-colors duration-300 ease-in-out
488+
className={`flex items-center gap-2 text-lg font-mono font-normal px-4 py-2 rounded-md border transition-colors duration-300 ease-in-out app-button-hover
499489
${false // Reset Tournament button is never disabled based on current logic
500490
? 'bg-gray-600 text-gray-400 cursor-not-allowed'
501-
: `bg-[${colors.app}] text-white hover:bg-[${colors.app}]`
502-
}`}
503-
style={buttonStyle}
504-
>
505-
Reset Tournament
506-
</button>
491+
: 'bg-app/50 text-white hover:bg-app/70'
492+
}`}> Reset Tournament </button>
507493
</div>
508494
</div>
509495
)}

0 commit comments

Comments
 (0)