diff --git a/components/ResultView.tsx b/components/ResultView.tsx index c2aeaa6..69afb76 100644 --- a/components/ResultView.tsx +++ b/components/ResultView.tsx @@ -4,6 +4,7 @@ import { useEffect, useRef, useState } from "react"; import { ArrowLeft } from "lucide-react"; import type { Card } from "@/lib/scoring/types"; import PlayerCard from "./PlayerCard"; +import TiltCard from "./TiltCard"; import StoryFrame from "./StoryFrame"; import CardActions from "./CardActions"; import DuelButton from "./DuelButton"; @@ -16,7 +17,7 @@ import GithubStar from "./GithubStar"; import dynamic from "next/dynamic"; import { AttributesPanel, MetricsPanel, ReportHeader } from "./ScoutReport"; import DistributionPanel from "./DistributionPanel"; -import { confettiPalette, resolveResultTheme } from "./finishTheme"; +import { confettiPalette, resolveCardTheme, resolveResultTheme } from "./finishTheme"; import { useReveal } from "@/hooks/useReveal"; import { burstConfetti } from "@/lib/confetti"; @@ -31,6 +32,9 @@ interface Props { stars?: number | null; /** GitHub-derived flag; share links only carry ?country= when it's overridden. */ canonicalCountry?: string; + /** When true, the card was scouted client-side with the visitor's own token. + * Disables sharing (no URL) and shows a "PRIVATE" badge. */ + isPrivate?: boolean; } // Card width scales with the viewport but is bounded by BOTH width and height @@ -43,6 +47,7 @@ export default function ResultView({ onCountryChange, stars, canonicalCountry = "", + isPrivate = false, }: Props) { const captureRef = useRef(null); const storyRef = useRef(null); @@ -167,19 +172,30 @@ export default function ResultView({ }} />
- + + +
- - + {isPrivate ? ( +
+ + PRIVATE — not shareable +
+ ) : ( + <> + + + + )}