rename internal types in domain models

This commit is contained in:
jeffvli
2025-11-03 20:38:18 -08:00
parent 76bf4ae825
commit 427f808180
23 changed files with 162 additions and 168 deletions
@@ -99,7 +99,7 @@ export const lyricsQueries = {
return queryOptions({
gcTime: Infinity,
queryFn: async ({ signal }): Promise<FullLyricsMetadata | null | StructuredLyric[]> => {
const server = getServerById(song?.serverId);
const server = getServerById(song?._serverId);
if (!server) throw new Error('Server not found');
if (!song) return null;
+6 -6
View File
@@ -45,7 +45,7 @@ export const Lyrics = () => {
lyricsQueries.songLyrics(
{
query: { songId: currentSong?.id || '' },
serverId: currentSong?.serverId || '',
serverId: currentSong?._serverId || '',
},
currentSong,
),
@@ -73,13 +73,13 @@ export const Lyrics = () => {
const handleOnResetLyric = useCallback(() => {
queryClient.invalidateQueries({
exact: true,
queryKey: queryKeys.songs.lyrics(currentSong?.serverId, { songId: currentSong?.id }),
queryKey: queryKeys.songs.lyrics(currentSong?._serverId, { songId: currentSong?.id }),
});
}, [currentSong?.id, currentSong?.serverId]);
}, [currentSong?.id, currentSong?._serverId]);
const handleOnRemoveLyric = useCallback(() => {
queryClient.setQueryData(
queryKeys.songs.lyrics(currentSong?.serverId, { songId: currentSong?.id }),
queryKeys.songs.lyrics(currentSong?._serverId, { songId: currentSong?.id }),
(prev: FullLyricsMetadata | undefined) => {
if (!prev) {
return undefined;
@@ -91,7 +91,7 @@ export const Lyrics = () => {
};
},
);
}, [currentSong?.id, currentSong?.serverId]);
}, [currentSong?.id, currentSong?._serverId]);
const fetchTranslation = useCallback(async () => {
if (!lyrics) return;
@@ -126,7 +126,7 @@ export const Lyrics = () => {
remoteSource: override?.source as LyricSource | undefined,
song: currentSong,
},
serverId: currentSong?.serverId || '',
serverId: currentSong?._serverId || '',
}),
);