mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-19 19:49:37 +02:00
Local search for apps
This commit is contained in:
parent
8521995758
commit
6ae6c58f4c
14 changed files with 297 additions and 4751 deletions
|
@ -7,6 +7,7 @@ import AppCard from '../AppCard/AppCard';
|
|||
interface ComponentProps {
|
||||
apps: App[];
|
||||
totalApps?: number;
|
||||
searching: boolean;
|
||||
}
|
||||
|
||||
const AppGrid = (props: ComponentProps): JSX.Element => {
|
||||
|
@ -16,26 +17,37 @@ const AppGrid = (props: ComponentProps): JSX.Element => {
|
|||
apps = (
|
||||
<div className={classes.AppGrid}>
|
||||
{props.apps.map((app: App): JSX.Element => {
|
||||
return <AppCard
|
||||
key={app.id}
|
||||
app={app}
|
||||
/>
|
||||
return <AppCard key={app.id} app={app} />;
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
);
|
||||
} else {
|
||||
if (props.totalApps) {
|
||||
apps = (
|
||||
<p className={classes.AppsMessage}>There are no pinned applications. You can pin them from the <Link to='/applications'>/applications</Link> menu</p>
|
||||
);
|
||||
if (props.searching) {
|
||||
apps = (
|
||||
<p className={classes.AppsMessage}>
|
||||
No apps match your search criteria
|
||||
</p>
|
||||
);
|
||||
} else {
|
||||
apps = (
|
||||
<p className={classes.AppsMessage}>
|
||||
There are no pinned applications. You can pin them from the{' '}
|
||||
<Link to="/applications">/applications</Link> menu
|
||||
</p>
|
||||
);
|
||||
}
|
||||
} else {
|
||||
apps = (
|
||||
<p className={classes.AppsMessage}>You don't have any applications. You can add a new one from <Link to='/applications'>/applications</Link> menu</p>
|
||||
<p className={classes.AppsMessage}>
|
||||
You don't have any applications. You can add a new one from{' '}
|
||||
<Link to="/applications">/applications</Link> menu
|
||||
</p>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return apps;
|
||||
}
|
||||
};
|
||||
|
||||
export default AppGrid;
|
||||
export default AppGrid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue