From 264292673468df3713dbb0330a3b2190fb60de17 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Sat, 9 Oct 2021 19:24:35 +0200 Subject: fix: correct image export --- components/Sidebar/OrgImage.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'components/Sidebar') diff --git a/components/Sidebar/OrgImage.tsx b/components/Sidebar/OrgImage.tsx index e8773e2..d602f0c 100644 --- a/components/Sidebar/OrgImage.tsx +++ b/components/Sidebar/OrgImage.tsx @@ -12,8 +12,6 @@ export const OrgImage = (props: OrgImageProps) => { const { src, file } = props const [image, setImage] = useState(null) - const dir = path.dirname(file) - const fullPath = encodeURIComponent(encodeURIComponent(path.join(dir, src))) /* ) * .then((res) => res.blob()) @@ -24,5 +22,12 @@ export const OrgImage = (props: OrgImageProps) => { * }) }, [fullPath]) */ - return + const dir = path.dirname(src) + const fullPath = encodeURIComponent(encodeURIComponent(path.join(dir, src))) + + const dumbLoader = ({ src, width, quality }: { [key: string]: string | number }) => { + return `http://localhost:35901/img/${src}` + } + + return } -- cgit v1.2.3