diff --git a/src/components/flow/Cell/index.tsx b/src/components/flow/Cell/index.tsx index 33e8b179..404d2de7 100644 --- a/src/components/flow/Cell/index.tsx +++ b/src/components/flow/Cell/index.tsx @@ -1,7 +1,7 @@ import React, { FC, useState, useCallback } from 'react'; import { INode } from '~/redux/types'; import { URLS } from '~/constants/urls'; -import { getImageSize } from '~/utils/dom'; +import { getImageSize, getURL } from '~/utils/dom'; import classNames = require('classnames'); import * as styles from './styles.scss'; @@ -37,11 +37,11 @@ const Cell: FC = ({ node: { id, title, brief, type }, onSelect, is_text
- +
)} diff --git a/src/utils/dom.ts b/src/utils/dom.ts index 3af07fac..b041a5f1 100644 --- a/src/utils/dom.ts +++ b/src/utils/dom.ts @@ -54,7 +54,7 @@ export const describeArc = ( ].join(' '); }; -export const getURL = (file: IFile) => { +export const getURL = (file: Partial) => { if (!file || !file.url) return null; return file.url