We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe6f5ea commit a99d776Copy full SHA for a99d776
client/packages/design/components/AvatarWithPreview/index.tsx
@@ -1,11 +1,12 @@
1
import React, { useState } from 'react';
2
import { Avatar, AvatarProps } from '../Avatar';
3
import { Image, imageUrlParser } from '../Image';
4
+import { isValidStr } from '../utils';
5
6
export const AvatarWithPreview: React.FC<AvatarProps> = React.memo((props) => {
7
const [visible, setVisible] = useState(false);
8
- const hasImage = typeof props.src === 'string';
9
+ const hasImage = isValidStr(props.src);
10
11
return (
12
<>
0 commit comments