fix: image ratio on the top page (#205)
This commit is contained in:
@@ -9,7 +9,7 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default function DemoImage({ imageName, altText }: Props) {
|
export default function DemoImage({ imageName, altText }: Props) {
|
||||||
const { theme, setTheme } = useTheme();
|
const { theme } = useTheme();
|
||||||
const [currentTheme, setCurrentTheme] = useState('light');
|
const [currentTheme, setCurrentTheme] = useState('light');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -20,13 +20,7 @@ export default function DemoImage({ imageName, altText }: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Image
|
<Image src={`/top/${currentTheme}/${imageName}.png`} alt={altText} shadow="md" className="max-w-full" />
|
||||||
src={`/top/${currentTheme}/${imageName}.png`}
|
|
||||||
alt={altText}
|
|
||||||
height={500}
|
|
||||||
shadow="md"
|
|
||||||
className="max-w-full"
|
|
||||||
/>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user