From 4b93c15267627f5574e001b19c438fcb7fb5c82d Mon Sep 17 00:00:00 2001
From: florian <>
Date: Sat, 25 May 2024 16:22:58 +0200
Subject: [PATCH] chore: cleanup
---
src/components/AudioPlayer.tsx | 2 +-
src/components/ServerList/ServerList.tsx | 5 ++++-
src/index.css | 4 ++--
src/utils/id3.ts | 1 -
src/utils/useUserServers.ts | 5 ++++-
5 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/components/AudioPlayer.tsx b/src/components/AudioPlayer.tsx
index 2e4e922..9da2ebc 100644
--- a/src/components/AudioPlayer.tsx
+++ b/src/components/AudioPlayer.tsx
@@ -105,7 +105,7 @@ const AudioPlayer: React.FC = () => {
/>
-
+
{volume === 0 ? (
withVirtualServers ? servers : servers.filter(s => !s.virtual), [servers, withVirtualServers])
+ const serversToList = useMemo(
+ () => (withVirtualServers ? servers : servers.filter(s => !s.virtual)),
+ [servers, withVirtualServers]
+ );
return (
<>
diff --git a/src/index.css b/src/index.css
index 3c47246..3f2d4d4 100644
--- a/src/index.css
+++ b/src/index.css
@@ -3,5 +3,5 @@
@tailwind utilities;
body:has(dialog[open]) {
- overflow: hidden;
-}
\ No newline at end of file
+ overflow: hidden;
+}
diff --git a/src/utils/id3.ts b/src/utils/id3.ts
index e1f2a05..cfe6581 100644
--- a/src/utils/id3.ts
+++ b/src/utils/id3.ts
@@ -1,7 +1,6 @@
import * as id3 from 'id3js';
import { BlobDescriptor } from 'blossom-client-sdk';
import { ID3TagV2 } from 'id3js/lib/id3Tag';
-import { Reader } from 'id3js/lib/reader';
export type AudioBlob = BlobDescriptor & { id3?: ID3Tag };
diff --git a/src/utils/useUserServers.ts b/src/utils/useUserServers.ts
index 119d63f..f9cf6dd 100644
--- a/src/utils/useUserServers.ts
+++ b/src/utils/useUserServers.ts
@@ -15,7 +15,10 @@ export const useUserServers = (): Server[] => {
const pubkey = user?.npub && (nip19.decode(user?.npub).data as string); // TODO validate type
- const serverListEvent = useEvent({ kinds: [USER_BLOSSOM_SERVER_LIST_KIND as NDKKind], authors: [pubkey!] }, { disable: !pubkey });
+ const serverListEvent = useEvent(
+ { kinds: [USER_BLOSSOM_SERVER_LIST_KIND as NDKKind], authors: [pubkey!] },
+ { disable: !pubkey }
+ );
const servers = useMemo(() => {
const serverUrls = (serverListEvent?.getMatchingTags('server').map(t => t[1]) || []).map(s =>