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 Sep 29, 2024
2 parents 37b021e + 7f3e515 commit 9b93d44
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 @@ -135,7 +135,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 @@ -154,7 +154,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 9b93d44

Please sign in to comment.