Skip to content

Commit 89372da

Browse files
committed
final fix
1 parent f4d7483 commit 89372da

13 files changed

+24
-9
lines changed

components/DualModeImage.tsx

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
11
import type { ComponentProps } from "react";
22
import Image from "next/image";
33

4-
54
type ImageProps = ComponentProps<typeof Image>;
65
type Props = Omit<ImageProps, "src"> & {
76
darkSrc: ImageProps["src"];
87
lightSrc: ImageProps["src"];
98
alt: string;
10-
}
9+
};
1110

12-
const DualModeImage = ({ darkSrc, lightSrc, className, alt, ...props }: Props) => {
11+
const DualModeImage = ({
12+
darkSrc,
13+
lightSrc,
14+
className,
15+
alt,
16+
...props
17+
}: Props) => {
1318
return (
1419
<>
15-
<Image src={lightSrc} className={`dark:hidden ${className}`} alt={alt} {...props} />
16-
<Image src={darkSrc} className={`hidden dark:block ${className}`} alt={alt} {...props} />
20+
<Image
21+
src={lightSrc}
22+
className={`dark:hidden ${className}`}
23+
alt={alt}
24+
{...props}
25+
/>
26+
<Image
27+
src={darkSrc}
28+
className={`hidden dark:block ${className}`}
29+
alt={alt}
30+
{...props}
31+
/>
1732
</>
1833
);
1934
};

images/ois/Graph 1 Light.png

-68.3 KB
Binary file not shown.

images/ois/Graph 2 Dark.png

-64.5 KB
Binary file not shown.

images/ois/Graph 2 Light.png

-63.8 KB
Binary file not shown.

images/ois/Graph_1_Dark.png

-70.2 KB
Binary file not shown.

images/ois/Graph_3_Dark.png

-83.4 KB
Binary file not shown.

images/ois/Graph_3_Light.png

-80.7 KB
Binary file not shown.
-36.8 KB
Binary file not shown.
35.1 KB
Loading

0 commit comments

Comments
 (0)