Fix clear, clean up
This commit is contained in:
parent
f6d239d87c
commit
1327d58b23
3 changed files with 1 additions and 12 deletions
|
@ -413,7 +413,6 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
|
||||||
|
|
||||||
if (ctx.dataNodes) {
|
if (ctx.dataNodes) {
|
||||||
for (const node of ctx.dataNodes) {
|
for (const node of ctx.dataNodes) {
|
||||||
console.log('node.data.itemType :>> ', node.data.itemType);
|
|
||||||
switch (node.data.itemType) {
|
switch (node.data.itemType) {
|
||||||
case LibraryItem.ALBUM:
|
case LibraryItem.ALBUM:
|
||||||
albumId.push(node.data.id);
|
albumId.push(node.data.id);
|
||||||
|
@ -448,8 +447,6 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('genreId', genreId);
|
|
||||||
|
|
||||||
openContextModal({
|
openContextModal({
|
||||||
innerProps: {
|
innerProps: {
|
||||||
albumId: albumId.length > 0 ? albumId : undefined,
|
albumId: albumId.length > 0 ? albumId : undefined,
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { useCallback, useEffect, useState } from 'react';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
import { Center, Group } from '@mantine/core';
|
import { Center, Group } from '@mantine/core';
|
||||||
import { AnimatePresence, motion } from 'framer-motion';
|
import { AnimatePresence, motion } from 'framer-motion';
|
||||||
import { clear } from 'idb-keyval';
|
|
||||||
import { ErrorBoundary } from 'react-error-boundary';
|
import { ErrorBoundary } from 'react-error-boundary';
|
||||||
import { RiInformationFill } from 'react-icons/ri';
|
import { RiInformationFill } from 'react-icons/ri';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
@ -162,7 +161,7 @@ export const Lyrics = () => {
|
||||||
|
|
||||||
const isLoadingLyrics = isInitialLoading || isOverrideLoading;
|
const isLoadingLyrics = isInitialLoading || isOverrideLoading;
|
||||||
|
|
||||||
const hasNoLyrics = !data?.lyrics || clear;
|
const hasNoLyrics = !data?.lyrics;
|
||||||
|
|
||||||
const lyricsMetadata:
|
const lyricsMetadata:
|
||||||
| Partial<SynchronizedLyricMetadata>
|
| Partial<SynchronizedLyricMetadata>
|
||||||
|
|
|
@ -93,8 +93,6 @@ export const useSongLyricsBySong = (
|
||||||
if (!server) throw new Error('Server not found');
|
if (!server) throw new Error('Server not found');
|
||||||
if (!song) return null;
|
if (!song) return null;
|
||||||
|
|
||||||
console.log('refetching song lyrics');
|
|
||||||
|
|
||||||
if (song.lyrics) {
|
if (song.lyrics) {
|
||||||
return {
|
return {
|
||||||
artist: song.artists?.[0]?.name,
|
artist: song.artists?.[0]?.name,
|
||||||
|
@ -166,11 +164,6 @@ export const useSongLyricsByRemoteId = (
|
||||||
source: query.remoteSource,
|
source: query.remoteSource,
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(
|
|
||||||
'queryKeys.songs.lyrics(serverId, { songId: query.song.id }) :>> ',
|
|
||||||
queryKeys.songs.lyrics(serverId, { songId: query.song.id }),
|
|
||||||
);
|
|
||||||
|
|
||||||
queryClient.setQueryData(
|
queryClient.setQueryData(
|
||||||
queryKeys.songs.lyrics(serverId, { songId: query.song.id }),
|
queryKeys.songs.lyrics(serverId, { songId: query.song.id }),
|
||||||
lyricsResult,
|
lyricsResult,
|
||||||
|
|
Reference in a new issue