mini-pic.tsx 537 B

123456789101112131415161718192021222324252627
  1. import { useTheme } from "next-themes";
  2. import { Image } from "@nextui-org/react";
  3. const MiniPic = () => {
  4. const { theme } = useTheme();
  5. const isDark = theme === "dark";
  6. return (
  7. <div>
  8. {isDark ? (
  9. <Image
  10. alt="cover"
  11. className="rounded-b-none object-cover"
  12. src="mini-dark.jpg"
  13. />
  14. ) : (
  15. <Image
  16. alt="cover"
  17. className="rounded-b-none object-cover"
  18. src="mini-light.jpg"
  19. />
  20. )}
  21. </div>
  22. );
  23. };
  24. export default MiniPic;