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`.
This commit is contained in:
parent
9889c258e3
commit
4ff32e0c61
2 changed files with 8 additions and 3 deletions
|
@ -7,15 +7,16 @@ import useLazyLoading from 'effects/use-lazy-loading';
|
||||||
type Props = {
|
type Props = {
|
||||||
thumb: string,
|
thumb: string,
|
||||||
children?: Node,
|
children?: Node,
|
||||||
|
className?: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
const Thumb = (props: Props) => {
|
const Thumb = (props: Props) => {
|
||||||
const { thumb, children } = props;
|
const { thumb, children, className } = props;
|
||||||
const thumbnailRef = React.useRef(null);
|
const thumbnailRef = React.useRef(null);
|
||||||
useLazyLoading(thumbnailRef);
|
useLazyLoading(thumbnailRef);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={thumbnailRef} data-background-image={thumb} className={classnames('media__thumb')}>
|
<div ref={thumbnailRef} data-background-image={thumb} className={classnames('media__thumb', className)}>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -53,7 +53,11 @@ function FileThumbnail(props: Props) {
|
||||||
const thumbnailUrl = url ? url.replace(/'/g, "\\'") : '';
|
const thumbnailUrl = url ? url.replace(/'/g, "\\'") : '';
|
||||||
|
|
||||||
if (hasResolvedClaim || thumbnailUrl) {
|
if (hasResolvedClaim || thumbnailUrl) {
|
||||||
return <Thumb thumb={thumbnailUrl}>{children}</Thumb>;
|
return (
|
||||||
|
<Thumb thumb={thumbnailUrl} className={className}>
|
||||||
|
{children}
|
||||||
|
</Thumb>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|
Loading…
Reference in a new issue