1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-30 08:09:35 +02:00

fix bookmarks display

fix apps search
search in urls in addition to names
This commit is contained in:
François Darveau 2021-12-10 12:28:03 -05:00
parent e7cd4d7705
commit 423670adb5
3 changed files with 24 additions and 14 deletions

View file

@ -26,15 +26,19 @@ export const AppGrid = (props: Props): JSX.Element => {
config: { config }
} = useSelector((state: State) => state);
const shouldBeShown = (category: Category) => {
return !config.hideEmptyCategories || category.apps.length > 0 || !fromHomepage
}
let apps: JSX.Element;
if (categories.length) {
if (categories.length && categories.some(shouldBeShown)) {
if (searching && !categories[0].apps.length) {
apps = <Message>No apps match your search criteria</Message>;
} else {
apps = (
<div className={classes.AppGrid}>
{categories.filter((category : Category) => !config.hideEmptyCategories || category.apps.length > 0).map(
{categories.filter(shouldBeShown).map(
(category: Category): JSX.Element => (
<AppCard
category={category}
@ -47,7 +51,7 @@ export const AppGrid = (props: Props): JSX.Element => {
);
}
} else {
if (totalCategories) {
if (totalCategories && !config.hideEmptyCategories) {
apps = (
<Message>
There are no pinned categories. You can pin them from the{' '}