Where to Watch
diff --git a/app/(pages)/titles/[id]/_components/title-hero.tsx b/app/(pages)/titles/[id]/_components/title-hero.tsx
index 8af1c55..1d073ac 100644
--- a/app/(pages)/titles/[id]/_components/title-hero.tsx
+++ b/app/(pages)/titles/[id]/_components/title-hero.tsx
@@ -1,9 +1,18 @@
+import {
+ IconCalendarEvent,
+ IconCircleCheck,
+ IconCircleX,
+ IconLoader,
+ IconRefresh,
+ IconStarFilled,
+} from "@tabler/icons-react";
import Image from "next/image";
import type { ReactNode } from "react";
import { TmdbLogo } from "@/components/tmdb-logo";
-import { Badge } from "@/components/ui/badge";
import type { ColorPalette, ResolvedTitle } from "@/lib/types/title";
+import { GenreCollapse } from "./genre-collapse";
import { TrailerDialog } from "./trailer-dialog";
+import { TypeBadge } from "./type-badge";
export function TitleHero({
title,
@@ -100,49 +109,37 @@ export function TitleHero({
{title.title}
-
-
- {title.type}
-
- {title.contentRating && (
-
- {title.contentRating}
-
- )}
- {year &&
{year}}
- {title.genres.length > 0 && (
-
{title.genres.join(" · ")}
- )}
- {title.voteAverage != null && title.voteAverage > 0 && (
-
- ★ {title.voteAverage.toFixed(1)}
- {title.voteCount != null && (
-
- ({title.voteCount.toLocaleString()})
+
+
+
+ {title.contentRating &&
{title.contentRating}}
+ {year &&
{year}}
+ {title.genres.length > 0 && (
+
+ )}
+ {title.voteAverage != null && title.voteAverage > 0 && (
+
+
+ {title.voteAverage.toFixed(1)}
+
+ )}
+ {title.status &&
+ !(title.type === "movie" && title.status === "Released") && (
+
+
+ {title.status}
)}
-
- )}
- {title.status && (
-
- {title.status}
-
- )}
-
-
-
+
+
+
@@ -161,6 +158,21 @@ export function TitleHero({
);
}
+const statusIcons: Record
= {
+ Ended: ,
+ Canceled: ,
+ "Returning Series": ,
+ "In Production": ,
+ "Post Production": ,
+ Planned: ,
+ Pilot: ,
+ Rumored: ,
+};
+
+function StatusIcon({ status }: { status: string }) {
+ return statusIcons[status] ?? null;
+}
+
function AmbientGlow({ palette }: { palette: ColorPalette | null }) {
if (!palette) return null;
diff --git a/app/(pages)/titles/[id]/_components/type-badge.tsx b/app/(pages)/titles/[id]/_components/type-badge.tsx
new file mode 100644
index 0000000..becf0d6
--- /dev/null
+++ b/app/(pages)/titles/[id]/_components/type-badge.tsx
@@ -0,0 +1,25 @@
+"use client";
+
+import { IconDeviceTv, IconMovie } from "@tabler/icons-react";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+
+export function TypeBadge({ type }: { type: "movie" | "tv" }) {
+ const isMovie = type === "movie";
+
+ return (
+
+
+ {isMovie ? (
+
+ ) : (
+
+ )}
+
+ {isMovie ? "Movie" : "TV Series"}
+
+ );
+}