Jelajahi Sumber

fix: use transparent PNG for Mini Cooper to avoid bg flash on theme switch

Replace dark/light JPEGs with a single transparent-background PNG so the
car image blends seamlessly with either theme.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rriecc 9 bulan lalu
induk
melakukan
908f02265f
2 mengubah file dengan 2 tambahan dan 5 penghapusan
  1. 2 5
      components/mini-pic.tsx
  2. TEMPAT SAMPAH
      public/mini.png

+ 2 - 5
components/mini-pic.tsx

@@ -1,4 +1,3 @@
-import { useTheme } from "next-themes";
 import { Image } from "@heroui/react";
 import { useRef } from "react";
 
@@ -8,8 +7,6 @@ interface MiniPicProps {
 }
 
 const MiniPic = ({ onClick, showOverlay = false }: MiniPicProps) => {
-  const { theme } = useTheme();
-  const isDark = theme === "dark";
   const startPos = useRef<{ x: number; y: number } | null>(null);
 
   const handleStart = (x: number, y: number) => {
@@ -38,10 +35,10 @@ const MiniPic = ({ onClick, showOverlay = false }: MiniPicProps) => {
         alt="Mini Cooper"
         classNames={{
           wrapper: "!max-w-none w-full h-full",
-          img: "w-full h-full object-cover",
+          img: "w-full h-full object-contain",
         }}
         radius="none"
-        src={isDark ? "mini-dark.jpg" : "mini-light.jpg"}
+        src="mini.png"
       />
       {showOverlay && (
         <div className="absolute inset-0 flex items-end justify-center pb-4 z-10 pointer-events-none">

TEMPAT SAMPAH
public/mini.png