1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

fixed flow-display error

This commit is contained in:
Fedor Katurov 2020-04-08 15:43:50 +07:00
parent 8ad5576983
commit 0c3625cd18

View file

@ -102,9 +102,10 @@ const Cell: FC<IProps> = ({
}, [id, flow, onChangeCellView]); }, [id, flow, onChangeCellView]);
const thumb = useMemo(() => { const thumb = useMemo(() => {
const preset = THUMBNAIL_SIZES[flow.display] || THUMBNAIL_SIZES.default; const preset =
(flow && flow.display && THUMBNAIL_SIZES[flow.display]) || THUMBNAIL_SIZES.default;
return getURL({ url: thumbnail }, preset); return getURL({ url: thumbnail }, preset);
}, [thumbnail, flow.display]); }, [thumbnail, flow]);
return ( return (
<div className={classNames(styles.cell, styles[(flow && flow.display) || 'single'])} ref={ref}> <div className={classNames(styles.cell, styles[(flow && flow.display) || 'single'])} ref={ref}>