mirror of
https://github.com/pawelmalak/flame.git
synced 2025-08-01 17:05:18 +02:00
fix local search
This commit is contained in:
parent
07596782ab
commit
4280511372
2 changed files with 22 additions and 13 deletions
|
@ -15,15 +15,15 @@ const AppGrid = (props: ComponentProps): JSX.Element => {
|
|||
let apps: JSX.Element;
|
||||
|
||||
if (props.categories.length > 0) {
|
||||
apps = (
|
||||
<div className={classes.AppGrid}>
|
||||
{props.categories.map((category: Category): JSX.Element => {
|
||||
return <AppCard key={category.id} category={category} apps={props.apps.filter((app: App) => app.categoryId === category.id)} />
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
if (props.totalCategories) {
|
||||
if (props.apps.length > 0) {
|
||||
apps = (
|
||||
<div className={classes.AppGrid}>
|
||||
{props.categories.map((category: Category): JSX.Element => {
|
||||
return <AppCard key={category.id} category={category} apps={props.apps.filter((app: App) => app.categoryId === category.id)} />
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
if (props.searching) {
|
||||
apps = (
|
||||
<p className={classes.AppsMessage}>
|
||||
|
@ -33,11 +33,20 @@ const AppGrid = (props: ComponentProps): JSX.Element => {
|
|||
} else {
|
||||
apps = (
|
||||
<p className={classes.AppsMessage}>
|
||||
There are no pinned application categories. You can pin them from the{' '}
|
||||
You don't have any applications. You can add a new one from the{' '}
|
||||
<Link to="/applications">/applications</Link> menu
|
||||
</p>
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (props.totalCategories) {
|
||||
apps = (
|
||||
<p className={classes.AppsMessage}>
|
||||
There are no pinned application categories. You can pin them from the{' '}
|
||||
<Link to="/applications">/applications</Link> menu
|
||||
</p>
|
||||
);
|
||||
} else {
|
||||
apps = (
|
||||
<p className={classes.AppsMessage}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue