({
appName,
image,
date,
fDelete,
title,
}: Pick<IProps, 'appName' | 'image' | 'fDelete' | 'date' | 'title'>)
| 218 | }; |
| 219 | |
| 220 | const HeaderWide = ({ |
| 221 | appName, |
| 222 | image, |
| 223 | date, |
| 224 | fDelete, |
| 225 | title, |
| 226 | }: Pick<IProps, 'appName' | 'image' | 'fDelete' | 'date' | 'title'>) => { |
| 227 | const {classes} = useStyles(); |
| 228 | |
| 229 | return ( |
| 230 | <div className={classes.header}> |
| 231 | <div className={classes.imageWrapper}> |
| 232 | {image !== null ? ( |
| 233 | <img |
| 234 | src={config.get('url') + image} |
| 235 | alt={`${appName} logo`} |
| 236 | width="50" |
| 237 | height="50" |
| 238 | className={classes.image} |
| 239 | /> |
| 240 | ) : null} |
| 241 | </div> |
| 242 | <div className={classes.headerTitle}> |
| 243 | <Typography className="title" variant="h5" lineHeight={1.2}> |
| 244 | {title} |
| 245 | </Typography> |
| 246 | <Typography variant="subtitle1" fontSize={12} style={{opacity: 0.7}}> |
| 247 | {appName} |
| 248 | </Typography> |
| 249 | </div> |
| 250 | <Typography variant="body1" className={classes.date}> |
| 251 | <TimeAgo date={date} formatter={TimeAgoFormatter.narrow} /> |
| 252 | </Typography> |
| 253 | <IconButton |
| 254 | onClick={fDelete} |
| 255 | style={{padding: 14}} |
| 256 | className={`${classes.trash} delete`} |
| 257 | size="large"> |
| 258 | <Delete /> |
| 259 | </IconButton> |
| 260 | </div> |
| 261 | ); |
| 262 | }; |
| 263 | const HeaderSmall = ({ |
| 264 | appName, |
| 265 | image, |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…