File tree Expand file tree Collapse file tree 1 file changed +9
-19
lines changed Expand file tree Collapse file tree 1 file changed +9
-19
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import ClayLabel from '@clayui/label';
11
11
import ClayLayout from '@clayui/layout' ;
12
12
import ClaySticker , { IClayStickerProps } from '@clayui/sticker' ;
13
13
import classNames from 'classnames' ;
14
- import React , { useMemo } from 'react' ;
14
+ import React from 'react' ;
15
15
16
16
import ClayCard from './Card' ;
17
17
@@ -135,25 +135,15 @@ export const ClayCardWithInfo: React.FunctionComponent<IProps> = ({
135
135
image : displayType === 'image' || imgProps ,
136
136
} ;
137
137
138
- const contentSymbol = useMemo ( ( ) => {
139
- if ( ! symbol ) {
140
- if ( isCardType . image ) {
141
- return 'camera' ;
142
- }
138
+ const contentSymbol = symbol
139
+ ? symbol
140
+ : isCardType . image
141
+ ? 'camera'
142
+ : 'documents-and-media' ;
143
143
144
- return 'documents-and-media' ;
145
- }
146
-
147
- return symbol ;
148
- } , [ isCardType ] ) ;
149
-
150
- const stickerSymbol = useMemo ( ( ) => {
151
- if ( isCardType . image ) {
152
- return 'document-image' ;
153
- }
154
-
155
- return 'document-default' ;
156
- } , [ isCardType ] ) ;
144
+ const stickerSymbol = isCardType . image
145
+ ? 'document-image'
146
+ : 'document-default' ;
157
147
158
148
const headerContent = (
159
149
< ClayCard . AspectRatio className = "card-item-first" >
You can’t perform that action at this time.
0 commit comments