Minor corrections
Signed-off-by: lmejbar <42239917+lmejbar@users.noreply.github.com>
This commit is contained in:
@@ -45,10 +45,7 @@ const useTechRadarLoader = (id: string | undefined) => {
|
||||
return { loading, value, error };
|
||||
};
|
||||
|
||||
const RadarComponent = (
|
||||
props: TechRadarComponentProps,
|
||||
searchText: string,
|
||||
): JSX.Element => {
|
||||
const RadarComponent = (props: TechRadarComponentProps): JSX.Element => {
|
||||
const { loading, error, value: data } = useTechRadarLoader(props.id);
|
||||
|
||||
const mapToEntries = (
|
||||
@@ -61,10 +58,10 @@ const RadarComponent = (
|
||||
element =>
|
||||
element.title
|
||||
.toLowerCase()
|
||||
.includes(props.searchText.toLowerCase()) ||
|
||||
.includes(props.searchText!.toLowerCase()) ||
|
||||
element.timeline[0].description
|
||||
?.toLowerCase()
|
||||
.includes(props.searchText.toLowerCase()),
|
||||
.includes(props.searchText!.toLowerCase()),
|
||||
);
|
||||
}
|
||||
return filteredArray.map(entry => {
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
Content,
|
||||
ContentHeader,
|
||||
Page,
|
||||
Header,
|
||||
// Header,
|
||||
SupportButton,
|
||||
InputTextFilter,
|
||||
} from '@backstage/core-components';
|
||||
@@ -48,7 +48,7 @@ export const RadarPage = ({
|
||||
const classes = useStyles();
|
||||
const [searchText, setSearchText] = React.useState('');
|
||||
|
||||
const searchInput = event => {
|
||||
const searchInput = (event: any) => {
|
||||
setSearchText(event.target.value);
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ export const RadarPage = ({
|
||||
</ContentHeader>
|
||||
<Grid container spacing={3} direction="row">
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<RadarComponent {...props} searchText={searchText} />
|
||||
<RadarComponent searchText={searchText} {...props} />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Content>
|
||||
|
||||
Reference in New Issue
Block a user