Added persistent sort to more locations
All checks were successful
Deploy to production / build (push) Successful in 18s
All checks were successful
Deploy to production / build (push) Successful in 18s
This commit is contained in:
@@ -27,8 +27,8 @@ import type { Application } from 'types';
|
||||
import DebouncedApplication from './DebouncedApplication';
|
||||
|
||||
export function Applications() {
|
||||
const [sortBy, setSortBy] = useState('Custom');
|
||||
const allIcons: any = { ...fa6, ...vsc, ...si };
|
||||
const { isMobile, reorder, theme, settings, updateSetting } = useCommonHooks();
|
||||
const defaultApplication: Application = {
|
||||
id: null,
|
||||
name: '',
|
||||
@@ -65,7 +65,7 @@ export function Applications() {
|
||||
)
|
||||
.sort((a: Application, b: Application) => {
|
||||
if (!dragging) {
|
||||
switch (sortBy) {
|
||||
switch (settings.appSettingsSort) {
|
||||
case 'A>Z':
|
||||
return a.name.toLocaleLowerCase() > b.name.toLocaleLowerCase() ? 1 : -1;
|
||||
case 'Z>A':
|
||||
@@ -89,7 +89,6 @@ export function Applications() {
|
||||
return a.index > b.index ? 1 : -1;
|
||||
});
|
||||
const [applicationList, setApplicationList] = useState<Application[]>([]);
|
||||
const { isMobile, reorder, theme } = useCommonHooks();
|
||||
const { mutateAsync } = useMutationAPI();
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
@@ -166,8 +165,10 @@ export function Applications() {
|
||||
searchPlaceholder={'Search Applications...'}
|
||||
isLoading={isLoading}
|
||||
setIsLoading={setIsLoading}
|
||||
sortBy={sortBy}
|
||||
setSortBy={setSortBy}
|
||||
sortBy={settings.appSettingsSort}
|
||||
setSortBy={(value) => {
|
||||
updateSetting('appSettingsSort', value);
|
||||
}}
|
||||
customSearchEnabled
|
||||
/>
|
||||
{modalOpened && (
|
||||
|
||||
Reference in New Issue
Block a user