From 4ff32e0c612a84ec6fcd9e3d3b23e4b490f7e571 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Thu, 29 Jul 2021 15:53:56 +0800 Subject: [PATCH] Fix missing file-thumbnail in Notifications ## Issue 6721 Notifications: Thumbnail for "new content" not showing up in Desktop layout ## Change The `className` wasn't propagated during the `FileThumbnail` refactoring to `Thumbs`. --- ui/component/fileThumbnail/thumb.jsx | 5 +++-- ui/component/fileThumbnail/view.jsx | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/component/fileThumbnail/thumb.jsx b/ui/component/fileThumbnail/thumb.jsx index a531ecd27..64f11c138 100644 --- a/ui/component/fileThumbnail/thumb.jsx +++ b/ui/component/fileThumbnail/thumb.jsx @@ -7,15 +7,16 @@ import useLazyLoading from 'effects/use-lazy-loading'; type Props = { thumb: string, children?: Node, + className?: string, }; const Thumb = (props: Props) => { - const { thumb, children } = props; + const { thumb, children, className } = props; const thumbnailRef = React.useRef(null); useLazyLoading(thumbnailRef); return ( -
+
{children}
); diff --git a/ui/component/fileThumbnail/view.jsx b/ui/component/fileThumbnail/view.jsx index 94a34de4a..6da4e513c 100644 --- a/ui/component/fileThumbnail/view.jsx +++ b/ui/component/fileThumbnail/view.jsx @@ -53,7 +53,11 @@ function FileThumbnail(props: Props) { const thumbnailUrl = url ? url.replace(/'/g, "\\'") : ''; if (hasResolvedClaim || thumbnailUrl) { - return {children}; + return ( + + {children} + + ); } return (