Unverified Commit e30d0c2d authored by Athurg Gooth's avatar Athurg Gooth Committed by GitHub

fix: image width error while loading (#2394)

fix image width error while loading
parent 213c2ea7
...@@ -44,7 +44,7 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => { ...@@ -44,7 +44,7 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {
(imageResourceList.length === 1 ? ( (imageResourceList.length === 1 ? (
<div className="mt-2 max-w-full max-h-72 flex justify-center items-center border dark:border-zinc-800 rounded overflow-hidden hide-scrollbar hover:shadow-md"> <div className="mt-2 max-w-full max-h-72 flex justify-center items-center border dark:border-zinc-800 rounded overflow-hidden hide-scrollbar hover:shadow-md">
<img <img
className="cursor-pointer min-h-full w-auto min-w-full object-cover" className="cursor-pointer min-h-full w-auto object-cover"
src={getResourceUrl(imageResourceList[0])} src={getResourceUrl(imageResourceList[0])}
onClick={() => handleImageClick(getResourceUrl(imageResourceList[0]))} onClick={() => handleImageClick(getResourceUrl(imageResourceList[0]))}
decoding="async" decoding="async"
...@@ -65,7 +65,7 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => { ...@@ -65,7 +65,7 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {
className="flex justify-center items-center border dark:border-zinc-900 rounded overflow-hidden hide-scrollbar hover:shadow-md" className="flex justify-center items-center border dark:border-zinc-900 rounded overflow-hidden hide-scrollbar hover:shadow-md"
> >
<img <img
className="cursor-pointer min-h-full w-auto min-w-full object-cover" className="cursor-pointer min-h-full w-auto object-cover"
src={resource.externalLink ? url : url + "?thumbnail=1"} src={resource.externalLink ? url : url + "?thumbnail=1"}
onClick={() => handleImageClick(url)} onClick={() => handleImageClick(url)}
decoding="async" decoding="async"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment