-
{report.avg_rating.toFixed(1)}★
-
{t("wrapup.averageRating")}
+
+
+
+
+ {t("wrapup.ratings")}
+
+
+
+ {report.avg_rating != null && (
+
+
{report.avg_rating.toFixed(1)}★
+
{t("wrapup.averageRating")}
+
+ )}
+
+
+ {report.busiest_month && (
+ {t("wrapup.busiestMonth", { month: report.busiest_month })}
+ )}
+ {report.busiest_day_of_week && (
+ {t("wrapup.favoriteDay", { day: report.busiest_day_of_week })}
+ )}
- )}
-
-
- {report.busiest_month && (
- {t("wrapup.busiestMonth", { month: report.busiest_month })}
- )}
- {report.busiest_day_of_week && (
- {t("wrapup.favoriteDay", { day: report.busiest_day_of_week })}
- )}
-
-
-
+
+
+
{/* Top Directors */}
{report.top_directors.length > 0 && (
-
+
+
+
)}
{/* Top Actors */}
{report.top_actors.length > 0 && (
-
+
+
+
)}
{/* Genres */}
{report.top_genres.length > 0 && (
-
-
- {t("wrapup.genres")}
- {t("wrapup.genresExplored", { count: report.genre_diversity })}
-
-
-
-
-
-
- } />
-
-
-
-
- {report.highest_rated_genre && (
- {t("wrapup.highestRated", { genre: report.highest_rated_genre })}
- )}
- {report.lowest_rated_genre && (
- {t("wrapup.lowestRated", { genre: report.lowest_rated_genre })}
- )}
-
-
-
+
+
+
+ {t("wrapup.genres")}
+ {t("wrapup.genresExplored", { count: report.genre_diversity })}
+
+
+
+
+
+
+ } />
+
+
+
+
+ {report.highest_rated_genre && (
+ {t("wrapup.highestRated", { genre: report.highest_rated_genre })}
+ )}
+ {report.lowest_rated_genre && (
+ {t("wrapup.lowestRated", { genre: report.lowest_rated_genre })}
+ )}
+
+
+
+
)}
{/* Monthly Activity */}
{report.movies_per_month.length > 0 && (
-
-
-
- {t("wrapup.monthlyActivity")}
-
-
-
-
-
- v.slice(5)} tick={{ fontSize: 10, fill: "rgba(255,255,255,0.85)" }} tickLine={false} axisLine={false} />
-
- report.movies_per_month.find((m) => m.year_month === String(v))?.label ?? String(v)} />} />
-
-
-
-
-
+
+
+
+
+ {t("wrapup.monthlyActivity")}
+
+
+
+
+
+ v.slice(5)} tick={{ fontSize: 10, fill: "rgba(255,255,255,0.85)" }} tickLine={false} axisLine={false} />
+
+ report.movies_per_month.find((m) => m.year_month === String(v))?.label ?? String(v)} />} />
+
+
+
+
+
+
)}
{/* Keywords */}
{report.top_keywords.length > 0 && (
-
-
-
- {t("wrapup.keywords")}
-
-
-
-
- {report.top_keywords
- .filter((k) => !k.keyword.includes("creditsstinger"))
- .slice(0, 15)
- .map((k) => (
-
- {k.keyword} {k.count}
-
- ))}
-
-
-
+
+
+
+
+ {t("wrapup.keywords")}
+
+
+
+
+ {report.top_keywords
+ .filter((k) => !k.keyword.includes("creditsstinger"))
+ .slice(0, 15)
+ .map((k) => (
+
+ {k.keyword} {k.count}
+
+ ))}
+
+
+
+
)}
{/* Budget & Language */}
@@ -191,144 +196,104 @@ function WrapUpReportPage() {
const hasLang = report.language_distribution.length > 1
const bothVisible = hasBudget && hasLang
return (
-
- {hasBudget && (
-
-
-
- ${Math.round(report.total_budget_watched! / 1_000_000)}M
- {t("wrapup.totalBudget")}
- {report.avg_budget != null && (
+
+
+ {hasBudget && (
+
+
+
+ {fmtUsd(report.total_budget_watched!)}
+ {t("wrapup.totalBudget")}
+ {report.avg_budget != null && (
+
+ {t("wrapup.avgBudget", { amount: fmtUsd(report.avg_budget) })}
+
+ )}
+
+
+ )}
+ {hasLang && (
+
+
+
+ {report.language_distribution.length}
+ {t("wrapup.languages")}
- {t("wrapup.avgBudget", { amount: `$${Math.round(report.avg_budget / 1_000_000)}M` })}
+ {report.language_distribution.slice(0, 3).map((l) => l.language.toUpperCase()).join(", ")}
- )}
-
-
- )}
- {hasLang && (
-
-
-
- {report.language_distribution.length}
- {t("wrapup.languages")}
-
- {report.language_distribution.slice(0, 3).map((l) => l.language.toUpperCase()).join(", ")}
-
-
-
- )}
-
+
+
+ )}
+
+
)})()}
{/* Highlights */}
-
-
- {t("wrapup.highlights")}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {/* Rewatches */}
- {report.total_rewatches > 0 && (
+
- {t("wrapup.rewatches")}
-
-
- {report.total_rewatches}
- {t("wrapup.moviesRewatched")}
- {report.most_rewatched_movie && (
-
- {t("wrapup.mostRewatched")} {report.most_rewatched_movie.title} ({report.most_rewatched_movie.year})
-
- )}
-
-
- )}
-
- {/* Poster Mosaic */}
- {report.poster_paths.length > 0 && (
-
-
- {t("wrapup.allMovies", { count: report.poster_paths.length })}
+ {t("wrapup.highlights")}
-
- {report.poster_paths.map((path, i) => (
-
-
})
-
- ))}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/* Rewatches */}
+ {report.total_rewatches > 0 && (
+
+
+
+ {t("wrapup.rewatches")}
+
+
+ {report.total_rewatches}
+ {t("wrapup.moviesRewatched")}
+ {report.most_rewatched_movie && (
+
+ {t("wrapup.mostRewatched")} {report.most_rewatched_movie.title} ({report.most_rewatched_movie.year})
+
+ )}
+
+
+
+ )}
+
+ {/* All Movies */}
+ {report.poster_paths.length > 0 && (
+
+
+
+ {t("wrapup.allMovies", { count: report.poster_paths.length })}
+
+
+
+ {report.poster_paths.map((path, i) => (
+
+
})
+
+ ))}
+
+
+
+
)}
)
}
-function RankCard({ title, subtitle, items, profilePaths }: { title: string; subtitle: string; items: PersonStat[]; profilePaths?: string[] }) {
- const { t } = useTranslation()
- return (
-
-
-
- {title}
-
- {subtitle}
-
-
-
- {items.map((item, i) => {
- const profilePath = profilePaths?.[i]
- return (
- -
- {item.person_id ? (
-
- {i + 1}
-
- {profilePath && }
- {item.name[0]}
-
-
-
{item.name}
-
{t("common.filmsAvg", { count: item.count, avg: item.avg_rating.toFixed(1) })}★
-
-
- ) : (
-
-
{i + 1}
-
- {profilePath && }
- {item.name[0]}
-
-
-
{item.name}
-
{t("common.filmsAvg", { count: item.count, avg: item.avg_rating.toFixed(1) })}★
-
-
- )}
-
- )
- })}
-
-
-
- )
-}
-
function MovieHighlight({ label, movie, showRuntime }: { label: string; movie?: MovieRef; showRuntime?: boolean }) {
if (!movie) return null
const content = (