Updates to settings to allow sorting
All checks were successful
Deploy to production / build (push) Successful in 20s

This commit is contained in:
2026-10-13 11:37:27 -05:00
parent 01dd6b1aa2
commit e4b07a3907
10 changed files with 220 additions and 50 deletions

View File

@@ -35,6 +35,7 @@ export function SettingsHeader({
setIsLoading,
sortBy,
setSortBy,
customSearchEnabled,
}: {
setDragging: undefined | ((dragging: boolean) => void);
openModal: undefined | (() => void);
@@ -51,6 +52,7 @@ export function SettingsHeader({
setIsLoading: (isLoading: boolean) => void;
sortBy: string;
setSortBy: undefined | ((sortBy: string) => void);
customSearchEnabled: boolean;
}) {
const { isMobile, theme } = useCommonHooks();
const [disabled, setDisabled] = useState(false);
@@ -245,21 +247,25 @@ export function SettingsHeader({
>
{'Oldest'}
</Menu.Item>
<Menu.Item
onClick={() => {
setSortBy('Custom');
}}
style={{
color:
sortBy === 'Custom'
? 'var(--mantine-color-background-0)'
: 'var(--mantine-color-primary-0)',
backgroundColor:
sortBy === 'Custom' ? 'var(--mantine-color-primary-0)' : undefined,
}}
>
{'Custom'}
</Menu.Item>
{customSearchEnabled && (
<Menu.Item
onClick={() => {
setSortBy('Custom');
}}
style={{
color:
sortBy === 'Custom'
? 'var(--mantine-color-background-0)'
: 'var(--mantine-color-primary-0)',
backgroundColor:
sortBy === 'Custom'
? 'var(--mantine-color-primary-0)'
: undefined,
}}
>
{'Custom'}
</Menu.Item>
)}
</Menu.Dropdown>
</Menu>
)}