fix bug where null ratings throw error in frontend
This commit is contained in:
parent
d79a82adee
commit
5819f5ca25
@ -24,13 +24,15 @@ export default function Result(props : ResultProps) {
|
||||
>
|
||||
{props.name}
|
||||
</Typography>
|
||||
<Rating
|
||||
readOnly
|
||||
value={props.rating.value * 5.0 / props.rating.maximum}
|
||||
precision={0.1}
|
||||
size='small'
|
||||
sx={{top: '2px'}}
|
||||
/>
|
||||
{props.rating &&
|
||||
<Rating
|
||||
readOnly
|
||||
value={props.rating.value * 5.0 / props.rating.maximum}
|
||||
precision={0.1}
|
||||
size='small'
|
||||
sx={{top: '2px'}}
|
||||
/>
|
||||
}
|
||||
</>
|
||||
}
|
||||
secondary={props.shortDescription}
|
||||
|
||||
@ -2,7 +2,7 @@ export default interface SolicitorSummary {
|
||||
name : string,
|
||||
shortDescription : string | null,
|
||||
id : string,
|
||||
rating : Rating
|
||||
rating : Rating | null
|
||||
};
|
||||
|
||||
export interface Rating {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user