chore: fix blackjack UI overflow and table sizing
Some checks failed
Deploy to Production / test (push) Failing after 34s

- Remove max-w-4xl constraint to allow single-player tables to expand
- Add responsive container sizing: 95vw on mobile, up to 6xl on large screens
- Add horizontal scrolling for split hands with overflow-x-auto
- Increase spacing between split hands on larger screens (gap-1.5 -> sm:gap-2)
- Add padding to container for better spacing on small screens
This commit is contained in:
syntaxbullet
2026-04-06 15:18:15 +02:00
parent 034f2ead1c
commit bdfe0d1594

View File

@@ -285,7 +285,7 @@ function Seat({ seat, playerName, isMe, isActivePlayer, activeHandIdx, betAmount
{/* Hands */}
{hasHands && (
<div className={`flex gap-1 ${seat.hands.length > 1 ? "flex-row" : "flex-col"}`}>
<div className={`flex gap-1.5 sm:gap-2 ${seat.hands.length > 1 ? "flex-row" : "flex-col"} overflow-x-auto sm:overflow-visible pb-1`}>
{seat.hands.map((hand, hi) => (
<HandDisplay
key={hi}
@@ -497,7 +497,9 @@ export function BlackjackGame({ state, myPlayerId, isSpectator, onAction, player
const handleSit = useCallback(() => onAction({ type: "sit_down" }), [onAction]);
return (
<div className="flex flex-col gap-3 w-full max-w-4xl mx-auto">
<div className={`flex flex-col gap-3 w-full mx-auto px-2 sm:px-4 ${
view.turnOrder.length === 1 ? 'max-w-[95vw] md:max-w-5xl lg:max-w-6xl' : 'max-w-4xl'
}`}>
{/* Leave table button */}
{!isSpectator && (
<div className="flex justify-end">