fix : force use dark theme in homepage

This commit is contained in:
2026-07-13 22:12:10 +07:00 Unverified
parent 0a1f8c2503
commit 52c91ab7f3
+5 -5
View File
@@ -10,7 +10,7 @@ import { Kbd } from "@/components/ui/kbd";
import Background from "@/public/background/space.webp";
export default async function Home() {
const { counts, tiktokProfile } = await getFollowerCounts();
const { counts } = await getFollowerCounts();
const headersList = await headers();
const ip = headersList.get("x-forwarded-for") || headersList.get("x-real-ip") || "unknown";
@@ -34,7 +34,7 @@ export default async function Home() {
console.error("Failed to track visitor:", e);
}
// Use TikTok profile data with config fallbacks
// Use configured profile data.
const profileName = config.profile.name;
const profileAvatar = config.profile.avatar;
@@ -56,7 +56,7 @@ export default async function Home() {
return (
<main className="flex min-h-screen flex-col items-center justify-center">
<main className="dark relative flex min-h-screen flex-col items-center justify-center bg-background text-foreground">
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
@@ -66,9 +66,9 @@ export default async function Home() {
alt="Background"
fill
priority
className="fixed top-0 left-0 z-[-1] h-full w-full object-cover opacity-60"
className="fixed top-0 left-0 z-0 h-full w-full object-cover opacity-60"
/>
<Card className="w-full max-w-sm overflow-hidden relative border-0 bg-black/20 md:bg-card md:border md:max-w-lg" role="article">
<Card className="relative z-10 w-full max-w-sm overflow-hidden border-0 bg-black/20 md:max-w-lg md:border md:bg-card" role="article">
<CardHeader className="flex flex-col items-center gap-4 text-center">
<div className="relative w-24 h-24 overflow-hidden rounded-full">
<Image