mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 01:35:39 -04:00
Rename TMDB_API_KEY to TMDB_API_READ_ACCESS_TOKEN and add optional base URL overrides
Renames the env var for clarity since it holds a read access token, not an API key. Adds optional TMDB_API_BASE_URL and TMDB_IMAGE_BASE_URL env vars for advanced users. Centralizes image URL construction into a shared tmdbImageUrl() helper, replacing hardcoded URLs across all components. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -6,6 +6,7 @@ import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useEffect } from "react";
|
||||
import { useSession } from "@/lib/auth/client";
|
||||
import { tmdbImageUrl } from "@/lib/tmdb/image";
|
||||
|
||||
/** Check whether the server has TMDB configured. */
|
||||
async function fetchSetupStatus(): Promise<boolean> {
|
||||
@@ -103,7 +104,7 @@ export default function Home() {
|
||||
>
|
||||
<div className="overflow-hidden rounded-xl shadow-lg">
|
||||
<Image
|
||||
src={`https://image.tmdb.org/t/p/w300${path}`}
|
||||
src={tmdbImageUrl(path, "w300")!}
|
||||
alt=""
|
||||
width={300}
|
||||
height={450}
|
||||
|
||||
Reference in New Issue
Block a user