Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions apps/web/components/forum/forum-post-detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useQuery, useMutation } from "@/lib/convex-auth-react";
import { api } from "@repo/backend";
import type { Id } from "@repo/backend/_generated/dataModel";
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
import {
ArrowBigUp,
ArrowLeft,
Expand Down Expand Up @@ -345,7 +346,7 @@ function PostContent({
return (
<div className="space-y-3">
<div className="prose prose-sm prose-invert max-w-none break-words prose-p:my-2 prose-pre:bg-zinc-900 prose-pre:text-zinc-200 prose-code:text-zinc-200 prose-a:text-indigo-300 prose-a:underline">
<ReactMarkdown>{extracted}</ReactMarkdown>
<ReactMarkdown remarkPlugins={[remarkGfm]}>{extracted}</ReactMarkdown>
</div>
<PostActivityCards content={extracted} />
</div>
Expand All @@ -358,7 +359,7 @@ function PostContent({
return (
<div className="space-y-3">
<div className="prose prose-sm prose-invert max-w-none break-words prose-p:my-2 prose-pre:bg-zinc-900 prose-pre:text-zinc-200 prose-code:text-zinc-200 prose-a:text-indigo-300 prose-a:underline">
<ReactMarkdown>{content}</ReactMarkdown>
<ReactMarkdown remarkPlugins={[remarkGfm]}>{content}</ReactMarkdown>
</div>
<PostActivityCards content={content} />
</div>
Expand Down
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"react-day-picker": "^9.2.3",
"react-dom": "19.2.4",
"react-markdown": "^10.1.0",
"remark-gfm": "^4.0.1",
"sonner": "^2.0.7",
"tailwind-merge": "^3.3.1",
"tailwindcss-animate": "^1.0.7",
Expand Down
3 changes: 2 additions & 1 deletion packages/backend/MINI-GAMES.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ A predator-prey chain based on the leaderboard at game start. Each participant "
**Assignment:**
- Each player's **prey** is the person one rank above them (lower rank number = higher on leaderboard)
- Each player's **hunter** is the person one rank below them
- Rank 1 (first place) has no prey to hunt
- Rank 1 (first place) has no prey — they earn the catch bonus by holding #1 (not getting caught)
- Last place has no hunter chasing them

**Config:**
Expand All @@ -60,6 +60,7 @@ bonusPoints = (caughtPrey ? catchBonus : 0) - (wasCaught ? caughtPenalty : 0)
- Catch prey only: `+75` points
- Caught by hunter only: `-25` points
- Catch prey AND caught by hunter: `+75 - 25 = +50` points
- Rank 1 holds position (not caught): `+75` points
- Neither: `0` points

---
Expand Down
6 changes: 6 additions & 0 deletions packages/backend/lib/miniGameCalculations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@ export async function previewHuntWeekEnd(
wasCaught = hunterCurrentRank < currentRank;
}

// The #1 player has no prey to catch, but earns the catch bonus
// by holding their position (not getting caught).
if (initialRank === 1 && !p.preyUserId && !wasCaught) {
caughtPrey = true;
}

const bonusPoints =
(caughtPrey ? catchBonus : 0) - (wasCaught ? caughtPenalty : 0);
totalBonusPoints += bonusPoints;
Expand Down
201 changes: 201 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading