1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-23 05:19:37 +02:00

Added option to hide apps and categories from home screen

This commit is contained in:
unknown 2021-06-24 10:54:48 +02:00
parent 12974ab01b
commit 550e1e155b
7 changed files with 98 additions and 31 deletions

View file

@ -1,4 +1,4 @@
import { useState, useEffect } from 'react';
import { useState, useEffect, Fragment } from 'react';
import { Link } from 'react-router-dom';
// Redux
@ -101,24 +101,33 @@ const Home = (props: ComponentProps): JSX.Element => {
: <div></div>
}
<SectionHeadline title='Applications' link='/applications' />
{appsLoading
? <Spinner />
: <AppGrid
apps={apps.filter((app: App) => app.isPinned)}
totalApps={apps.length}
/>
{searchConfig('hideApps', 0) !== 1
? (<Fragment>
<SectionHeadline title='Applications' link='/applications' />
{appsLoading
? <Spinner />
: <AppGrid
apps={apps.filter((app: App) => app.isPinned)}
totalApps={apps.length}
/>
}
<div className={classes.HomeSpace}></div>
</Fragment>)
: <div></div>
}
<div className={classes.HomeSpace}></div>
<SectionHeadline title='Bookmarks' link='/bookmarks' />
{categoriesLoading
? <Spinner />
: <BookmarkGrid
categories={categories.filter((category: Category) => category.isPinned)}
totalCategories={categories.length}
/>
{searchConfig('hideCategories', 0) !== 1
? (<Fragment>
<SectionHeadline title='Bookmarks' link='/bookmarks' />
{categoriesLoading
? <Spinner />
: <BookmarkGrid
categories={categories.filter((category: Category) => category.isPinned)}
totalCategories={categories.length}
/>
}
</Fragment>)
: <div></div>
}
<Link to='/settings' className={classes.SettingsButton}>