1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: update PR based on feedback

This commit is contained in:
Youssef 2022-03-01 09:50:29 +01:00
parent 55de43ad07
commit 14154b605a
2 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ export const useStyles = makeStyles(theme => ({
},
},
searchBar: {
minWidth: '450px',
minWidth: 450,
[theme.breakpoints.down('xs')]: {
minWidth: '100%',
},

View File

@ -56,7 +56,7 @@ export const ProjectListNew = () => {
const filteredProjects = useMemo(() => {
const regExp = new RegExp(filter, 'i');
return filter
? projects?.filter(project => regExp.test(project?.name))
? projects.filter(project => regExp.test(project.name))
: projects;
}, [projects, filter]);
@ -90,7 +90,7 @@ export const ProjectListNew = () => {
return renderLoading();
}
return filteredProjects?.map((project: IProjectCard) => {
return filteredProjects.map((project: IProjectCard) => {
return (
<Link
key={project.id}
@ -166,7 +166,7 @@ export const ProjectListNew = () => {
<ConditionallyRender condition={error} show={renderError()} />
<div className={styles.container}>
<ConditionallyRender
condition={filteredProjects?.length < 1 && !loading}
condition={filteredProjects.length < 1 && !loading}
show={<div>No projects available.</div>}
elseShow={renderProjects()}
/>