Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
fix: Fix image style
Browse files Browse the repository at this point in the history
  • Loading branch information
Sansai-snct committed Dec 16, 2022
1 parent 05d57df commit 932f7f6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/pages/edit/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
HStack,
useDisclosure,
Input,
AspectRatio,
} from "@chakra-ui/react";
import type { NextPageWithLayout } from "next";
import { useRouter } from "next/router";
Expand Down Expand Up @@ -148,7 +149,16 @@ const Edit: NextPageWithLayout = () => {
/>

{imageUrl ? (
<Image width={128} height={128} src={imageUrl} alt="Preview Image" />
<Box w="full">
<AspectRatio ratio={16 / 9}>
<Image
fill
style={{ objectFit: "contain" }}
src={imageUrl}
alt="Preview Image"
/>
</AspectRatio>
</Box>
) : null}
</Modal>
</Box>
Expand Down

0 comments on commit 932f7f6

Please sign in to comment.