</Tooltip>
}
subheader={
- <Tooltip title={process.containerRequest.description || '(no-description)'} placement="bottom-start">
+ <Tooltip title={getDescription(process)} placement="bottom-start">
<Typography noWrap variant="body2" color='inherit'>
- {process.containerRequest.description || '(no-description)'}
+ {getDescription(process)}
</Typography>
</Tooltip>} />
<CardContent className={classes.content}>
</Grid>
</CardContent>
</Card>
-);
\ No newline at end of file
+);
+
+const getDescription = (process: Process) =>
+ process.containerRequest.description || '(no-description)';