formatting
This commit is contained in:
parent
2ff7d1759e
commit
4f59f3bc14
23 changed files with 994 additions and 3338 deletions
|
|
@ -53,7 +53,11 @@ export const QuestionCard = ({
|
|||
Round {questionNumber}/{totalQuestions}
|
||||
</div>
|
||||
<div className="text-xs font-semibold text-(--color-text-muted)">
|
||||
{currentResult ? "Checked" : selectedOptionId !== null ? "Ready" : "Pick one"}
|
||||
{currentResult
|
||||
? "Checked"
|
||||
: selectedOptionId !== null
|
||||
? "Ready"
|
||||
: "Pick one"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -73,14 +77,14 @@ export const QuestionCard = ({
|
|||
|
||||
<div className="w-full rounded-3xl border border-(--color-primary-light) bg-white/55 dark:bg-black/10 backdrop-blur shadow-sm p-4">
|
||||
<div className="flex flex-col gap-3">
|
||||
{question.options.map((option) => (
|
||||
<OptionButton
|
||||
key={option.optionId}
|
||||
text={option.text}
|
||||
state={getOptionState(option.optionId)}
|
||||
onSelect={() => handleSelect(option.optionId)}
|
||||
/>
|
||||
))}
|
||||
{question.options.map((option) => (
|
||||
<OptionButton
|
||||
key={option.optionId}
|
||||
text={option.text}
|
||||
state={getOptionState(option.optionId)}
|
||||
onSelect={() => handleSelect(option.optionId)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,9 @@ export const MultiplayerScoreScreen = ({
|
|||
</span>
|
||||
<span
|
||||
className={`text-sm font-semibold ${
|
||||
isCurrentUser ? "text-(--color-text)" : "text-(--color-text)"
|
||||
isCurrentUser
|
||||
? "text-(--color-text)"
|
||||
: "text-(--color-text)"
|
||||
}`}
|
||||
>
|
||||
{player.user.name}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,7 @@ type ConfettiBurstProps = {
|
|||
count?: number;
|
||||
};
|
||||
|
||||
type Piece = {
|
||||
id: number;
|
||||
style: React.CSSProperties & ConfettiVars;
|
||||
};
|
||||
type Piece = { id: number; style: React.CSSProperties & ConfettiVars };
|
||||
|
||||
type ConfettiVars = {
|
||||
["--x0"]: string;
|
||||
|
|
@ -56,7 +53,9 @@ export const ConfettiBurst = ({
|
|||
}, []);
|
||||
|
||||
const pieces = useMemo<Piece[]>(() => {
|
||||
const seed = hashStringToUint32(`${instanceId}:${count}:${colors.join(",")}`);
|
||||
const seed = hashStringToUint32(
|
||||
`${instanceId}:${count}:${colors.join(",")}`,
|
||||
);
|
||||
const rand = mulberry32(seed);
|
||||
const rnd = (min: number, max: number) => min + rand() * (max - min);
|
||||
|
||||
|
|
@ -100,4 +99,3 @@ export const ConfettiBurst = ({
|
|||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,9 @@ function MultiplayerPage() {
|
|||
|
||||
{/* Join lobby */}
|
||||
<div className="flex flex-col gap-2">
|
||||
<h2 className="text-lg font-bold text-(--color-text)">Join a lobby</h2>
|
||||
<h2 className="text-lg font-bold text-(--color-text)">
|
||||
Join a lobby
|
||||
</h2>
|
||||
<p className="text-sm text-(--color-text-muted)">
|
||||
Enter the code shared by your host.
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue