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}
|
{props.name}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Rating
|
{props.rating &&
|
||||||
readOnly
|
<Rating
|
||||||
value={props.rating.value * 5.0 / props.rating.maximum}
|
readOnly
|
||||||
precision={0.1}
|
value={props.rating.value * 5.0 / props.rating.maximum}
|
||||||
size='small'
|
precision={0.1}
|
||||||
sx={{top: '2px'}}
|
size='small'
|
||||||
/>
|
sx={{top: '2px'}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
secondary={props.shortDescription}
|
secondary={props.shortDescription}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ export default interface SolicitorSummary {
|
|||||||
name : string,
|
name : string,
|
||||||
shortDescription : string | null,
|
shortDescription : string | null,
|
||||||
id : string,
|
id : string,
|
||||||
rating : Rating
|
rating : Rating | null
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface Rating {
|
export interface Rating {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user