stillerman commited on
Commit
ad056e1
·
1 Parent(s): 70a8dcb

Annoying spacing issue

Browse files
Files changed (1) hide show
  1. src/components/game-component.tsx +5 -8
src/components/game-component.tsx CHANGED
@@ -508,7 +508,7 @@ export default function GameComponent({
508
  </h2>
509
 
510
  {gameStatus === "playing" ? (
511
- <div className="grid grid-cols-3 gap-x-1 gap-y-0 overflow-y-auto h-[calc(100%-2.5rem)]">
512
  {currentPageLinks
513
  .sort((a, b) => a.localeCompare(b))
514
  .map((link) => (
@@ -516,9 +516,8 @@ export default function GameComponent({
516
  key={link}
517
  variant="outline"
518
  size="sm"
519
- className="justify-start overflow-hidden text-ellipsis whitespace-nowrap"
520
  onClick={() => handleLinkClick(link)}
521
- disabled={player === "model" || modelStatus === "thinking"}
522
  >
523
  {link}
524
  </Button>
@@ -529,11 +528,10 @@ export default function GameComponent({
529
  {gameStatus === "won" ? (
530
  <div className="bg-green-100 text-green-800 p-4 rounded-md w-full">
531
  <h3 className="font-bold">
532
- {player === "model" ? `${model} won!` : "You won!"}
533
  </h3>
534
  <p>
535
- {player === "model" ? "It" : "You"} reached {targetPage} in{" "}
536
- {hops} hops.
537
  </p>
538
  <Button
539
  onClick={onReset}
@@ -548,8 +546,7 @@ export default function GameComponent({
548
  <div className="bg-red-100 text-red-800 p-4 rounded-md w-full">
549
  <h3 className="font-bold">Game Over</h3>
550
  <p>
551
- {player === "model" ? `${model} didn't` : "You didn't"}{" "}
552
- reach {targetPage} within {maxHops} hops.
553
  </p>
554
  <Button
555
  onClick={onReset}
 
508
  </h2>
509
 
510
  {gameStatus === "playing" ? (
511
+ <div className="flex flex-wrap content-start overflow-y-auto h-[calc(100%-2.5rem)]">
512
  {currentPageLinks
513
  .sort((a, b) => a.localeCompare(b))
514
  .map((link) => (
 
516
  key={link}
517
  variant="outline"
518
  size="sm"
519
+ className="justify-start overflow-hidden text-ellipsis whitespace-nowrap w-[calc(33.333%-0.5rem)] m-[0.25rem]"
520
  onClick={() => handleLinkClick(link)}
 
521
  >
522
  {link}
523
  </Button>
 
528
  {gameStatus === "won" ? (
529
  <div className="bg-green-100 text-green-800 p-4 rounded-md w-full">
530
  <h3 className="font-bold">
531
+ You won!
532
  </h3>
533
  <p>
534
+ You reached {targetPage} in {hops} hops.
 
535
  </p>
536
  <Button
537
  onClick={onReset}
 
546
  <div className="bg-red-100 text-red-800 p-4 rounded-md w-full">
547
  <h3 className="font-bold">Game Over</h3>
548
  <p>
549
+ You didn't reach {targetPage} within {maxHops} hops.
 
550
  </p>
551
  <Button
552
  onClick={onReset}