4.8.10 test (#2470)
* i18n * perf: invoice type * fix: helper line change error * perf: base64 image * perf: app list ui * perf: upload max size check * perf: init system plugin * perf: dataset list ui * perf: http node ui * perf: ui * perf: invoice tip * fix: ts * perf: invoice table * perf: null check
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import { ImageProps, Skeleton } from '@chakra-ui/react';
|
||||
import { Box, ImageProps, Skeleton } from '@chakra-ui/react';
|
||||
import MyPhotoView from '@fastgpt/web/components/common/Image/PhotoView';
|
||||
import { useBoolean } from 'ahooks';
|
||||
|
||||
@@ -8,6 +8,10 @@ const MdImage = ({ src, ...props }: { src?: string } & ImageProps) => {
|
||||
|
||||
const [renderSrc, setRenderSrc] = useState(src);
|
||||
|
||||
if (src?.includes('base64') && !src.startsWith('data:image')) {
|
||||
return <Box>Invalid base64 image</Box>;
|
||||
}
|
||||
|
||||
return (
|
||||
<Skeleton isLoaded={isLoaded}>
|
||||
<MyPhotoView
|
||||
|
||||
Reference in New Issue
Block a user