fix bug where null ratings throw error in frontend

This commit is contained in:
Fox 2026-06-24 12:24:47 +01:00
parent d79a82adee
commit 5819f5ca25
2 changed files with 10 additions and 8 deletions

View File

@ -24,6 +24,7 @@ export default function Result(props : ResultProps) {
>
{props.name}
</Typography>
{props.rating &&
<Rating
readOnly
value={props.rating.value * 5.0 / props.rating.maximum}
@ -31,6 +32,7 @@ export default function Result(props : ResultProps) {
size='small'
sx={{top: '2px'}}
/>
}
</>
}
secondary={props.shortDescription}

View File

@ -2,7 +2,7 @@ export default interface SolicitorSummary {
name : string,
shortDescription : string | null,
id : string,
rating : Rating
rating : Rating | null
};
export interface Rating {