feat: add no result found UI on executions

This commit is contained in:
Ali BARIN
2022-08-12 19:19:07 +02:00
parent a5f391d2dc
commit 38700256b0
3 changed files with 21 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ import { CardContent } from './style';
type NoResultFoundProps = {
text?: string;
to: string;
to?: string;
}
export default function NoResultFound(props: NoResultFoundProps): React.ReactElement {
@@ -21,6 +21,8 @@ export default function NoResultFound(props: NoResultFoundProps): React.ReactEle
linkProps,
ref,
) {
if (!to) return <div>{linkProps.children}</div>;
return <Link ref={ref} to={to} {...linkProps} />;
}),
[to],
@@ -30,7 +32,7 @@ export default function NoResultFound(props: NoResultFoundProps): React.ReactEle
<Card elevation={0}>
<CardActionArea component={ActionAreaLink} {...props}>
<CardContent>
<AddCircleIcon color="primary" />
{!!to && <AddCircleIcon color="primary" />}
<Typography variant="body1">
{text}