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,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}

View File

@ -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 {