diff --git a/src/components/flow/Cell/index.tsx b/src/components/flow/Cell/index.tsx index 2aaa7b60..33e8b179 100644 --- a/src/components/flow/Cell/index.tsx +++ b/src/components/flow/Cell/index.tsx @@ -1,5 +1,4 @@ import React, { FC, useState, useCallback } from 'react'; -import { NavLink } from 'react-router-dom'; import { INode } from '~/redux/types'; import { URLS } from '~/constants/urls'; import { getImageSize } from '~/utils/dom'; @@ -38,11 +37,11 @@ const Cell: FC = ({ node: { id, title, brief, type }, onSelect, is_text
- +
)} diff --git a/src/components/node/NodeImageBlock/index.tsx b/src/components/node/NodeImageBlock/index.tsx index 7af38717..a8b44c53 100644 --- a/src/components/node/NodeImageBlock/index.tsx +++ b/src/components/node/NodeImageBlock/index.tsx @@ -78,7 +78,7 @@ const NodeImageBlock: FC = ({ node, is_loading }) => { > { if (!file || !file.url) return null; return file.url - .replace('REMOTE_OLD://', process.env.REMOTE_OLD) - .replace('REMOTE_CURRENT://', process.env.REMOTE_CURRENT); + .replace('REMOTE_CURRENT://', process.env.REMOTE_CURRENT) + .replace('REMOTE_OLD://', process.env.REMOTE_OLD); }; -export const getImageSize = (image: string, size?: string): string => - `${process.env.API_HOST}${image}`.replace('{size}', size); +export const getImageSize = (file: IFile, size?: string): string => getURL(file); +// `${process.env.API_HOST}${image}`.replace('{size}', size); export const formatCommentText = (author, text: string) => text