1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +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]);
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);
}, [thumbnail, flow.display]);
}, [thumbnail, flow]);
return (
<div className={classNames(styles.cell, styles[(flow && flow.display) || 'single'])} ref={ref}>