From b844e58568e1702e5cee699a2d02cb9c95088bff Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Sat, 12 Oct 2019 17:22:47 +0700 Subject: [PATCH] displaying cells --- src/components/flow/Cell/index.tsx | 6 +++--- src/utils/dom.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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