diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-10-09 19:55:44 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-10-09 19:55:44 +0200 |
commit | 330bf49492a8babf5a1fc5f8d4c88f3237a0c1f8 (patch) | |
tree | 488bf858a3a7658962f92a835192c04043b975b1 /components/Sidebar/OrgImage.tsx | |
parent | f634e215b81da6977f28d78f45d4148d786096dc (diff) |
feat(preview): image previewing
Diffstat (limited to 'components/Sidebar/OrgImage.tsx')
-rw-r--r-- | components/Sidebar/OrgImage.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/Sidebar/OrgImage.tsx b/components/Sidebar/OrgImage.tsx index d602f0c..a87fc4c 100644 --- a/components/Sidebar/OrgImage.tsx +++ b/components/Sidebar/OrgImage.tsx @@ -22,12 +22,14 @@ export const OrgImage = (props: OrgImageProps) => { * }) }, [fullPath]) */ - const dir = path.dirname(src) + const dir = path.dirname(file) const fullPath = encodeURIComponent(encodeURIComponent(path.join(dir, src))) const dumbLoader = ({ src, width, quality }: { [key: string]: string | number }) => { return `http://localhost:35901/img/${src}` } - return <Image unoptimized loader={dumbLoader} src={fullPath} alt="" width={100} height={100} /> + return ( + <Image layout="responsive" loader={dumbLoader} src={fullPath} alt="" width="70%" height="70%" /> + ) } |