File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,11 @@ const makeQualificationListItemComp = metadataName => {
37
37
}
38
38
}
39
39
40
- const Qualification = ( { file = { } } ) => {
40
+ const isExpirationAlertHidden = file => {
41
+ return file ?. metadata ?. hideExpirationAlert ?? false
42
+ }
43
+
44
+ const Qualification = ( { file } ) => {
41
45
const { metadata = { } } = file
42
46
const actionBtnRef = useRef ( [ ] )
43
47
const [ optionFile , setOptionFile ] = useState ( {
@@ -69,7 +73,7 @@ const Qualification = ({ file = {} }) => {
69
73
70
74
return (
71
75
< >
72
- { isExpiringSoon ( file ) && ! file ?. metadata ?. hideExpirationAlert && (
76
+ { isExpiringSoon ( file ) && ! isExpirationAlertHidden ( file ) && (
73
77
< ExpirationAlert file = { file } />
74
78
) }
75
79
< List className = { 'u-pv-1' } >
@@ -102,7 +106,7 @@ const Qualification = ({ file = {} }) => {
102
106
}
103
107
104
108
Qualification . propTypes = {
105
- file : PropTypes . object
109
+ file : PropTypes . object . isRequired
106
110
}
107
111
108
112
export default withViewerLocales ( Qualification )
You can’t perform that action at this time.
0 commit comments