Added persistent sort to more locations
All checks were successful
Deploy to production / build (push) Successful in 18s

This commit is contained in:
2026-10-20 18:58:52 -05:00
parent 2cf34f86fa
commit 2f8d3ad58e
9 changed files with 63 additions and 37 deletions

View File

@@ -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 && (