Updates to settings to allow sorting
All checks were successful
Deploy to production / build (push) Successful in 20s
All checks were successful
Deploy to production / build (push) Successful in 20s
This commit is contained in:
@@ -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>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user