forked from Archives/Athou_commafeed
replace toSorted usage with sort (#1183)
This commit is contained in:
@@ -39,7 +39,7 @@ export function CategorySelect(props: CategorySelectProps) {
|
|||||||
label: categoryLabel(c),
|
label: categoryLabel(c),
|
||||||
value: c.id,
|
value: c.id,
|
||||||
}))
|
}))
|
||||||
.toSorted((c1, c2) => c1.label.localeCompare(c2.label))
|
.sort((c1, c2) => c1.label.localeCompare(c2.label))
|
||||||
if (props.withAll) {
|
if (props.withAll) {
|
||||||
selectData?.unshift({
|
selectData?.unshift({
|
||||||
label: t`All`,
|
label: t`All`,
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ export function TreeSearch(props: TreeSearchProps) {
|
|||||||
const dispatch = useAppDispatch()
|
const dispatch = useAppDispatch()
|
||||||
|
|
||||||
const actions: SpotlightActionData[] = props.feeds
|
const actions: SpotlightActionData[] = props.feeds
|
||||||
.toSorted((f1, f2) => f1.name.localeCompare(f2.name))
|
|
||||||
.map(f => ({
|
.map(f => ({
|
||||||
id: `${f.id}`,
|
id: `${f.id}`,
|
||||||
label: f.name,
|
label: f.name,
|
||||||
leftSection: <FeedFavicon url={f.iconUrl} />,
|
leftSection: <FeedFavicon url={f.iconUrl} />,
|
||||||
onClick: async () => await dispatch(redirectToFeed(f.id)),
|
onClick: async () => await dispatch(redirectToFeed(f.id)),
|
||||||
}))
|
}))
|
||||||
|
.sort((f1, f2) => f1.label.localeCompare(f2.label))
|
||||||
|
|
||||||
const searchIcon = <TbSearch size={18} />
|
const searchIcon = <TbSearch size={18} />
|
||||||
const rightSection = (
|
const rightSection = (
|
||||||
|
|||||||
Reference in New Issue
Block a user