Skip to content

Commit

Permalink
Merge branch 'sort_antennas_and_lists' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
aliceif committed Nov 21, 2024
2 parents 92057e4 + e7408ae commit b7de71c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/my-antennas/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
import { antennasCache } from '@/cache.js';
import { infoImageUrl } from '@/instance.js';

const antennas = computed(() => antennasCache.value.value ?? []);
const antennas = computed(() => (antennasCache.value.value ?? []).sort((x, y) => x.name.localeCompare(y.name)));

function fetch() {
antennasCache.fetch();
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/my-lists/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { signinRequired } from '@/account.js';

const $i = signinRequired();

const items = computed(() => userListsCache.value.value ?? []);
const items = computed(() => (userListsCache.value.value ?? []).sort((x, y) => x.name.localeCompare(y.name)));

function fetch() {
userListsCache.fetch();
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/pages/timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function top(): void {
}

async function chooseList(ev: MouseEvent): Promise<void> {
const lists = await userListsCache.fetch();
const lists = (await userListsCache.fetch()).sort((x, y) => x.name.localeCompare(y.name));
const items: MenuItem[] = [
...lists.map(list => ({
type: 'link' as const,
Expand All @@ -150,7 +150,7 @@ async function chooseList(ev: MouseEvent): Promise<void> {
}

async function chooseAntenna(ev: MouseEvent): Promise<void> {
const antennas = await antennasCache.fetch();
const antennas = (await antennasCache.fetch()).sort((x, y) => x.name.localeCompare(y.name));
const items: MenuItem[] = [
...antennas.map(antenna => ({
type: 'link' as const,
Expand Down

0 comments on commit b7de71c

Please sign in to comment.