feat(web/m7-377): AlbumMenu component + listAlbumTracks helper

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-04 11:59:38 -04:00
parent ce01b3d992
commit 43a3dc47a8
3 changed files with 238 additions and 1 deletions
+6 -1
View File
@@ -1,7 +1,7 @@
import { createInfiniteQuery } from '@tanstack/svelte-query';
import { api } from './client';
import { qk } from './queries';
import type { AlbumRef, Page } from './types';
import type { AlbumRef, AlbumDetail, Page, TrackRef } from './types';
export const ALBUM_PAGE_SIZE = 50;
@@ -20,3 +20,8 @@ export function createAlbumsAlphaInfiniteQuery() {
}
});
}
export async function listAlbumTracks(albumId: string): Promise<TrackRef[]> {
const detail = await api.get<AlbumDetail>(`/api/albums/${albumId}`);
return detail.tracks;
}