chore: cleanup

This commit is contained in:
florian 2024-05-25 16:22:58 +02:00
parent 05fe930812
commit 4b93c15267
5 changed files with 11 additions and 6 deletions

View File

@ -105,7 +105,7 @@ const AudioPlayer: React.FC = () => {
/> />
</div> </div>
<div className="flex items-center space-x-2" > <div className="flex items-center space-x-2">
{volume === 0 ? ( {volume === 0 ? (
<SpeakerXMarkIcon <SpeakerXMarkIcon
className="h-6 w-6 text-gray-500" className="h-6 w-6 text-gray-500"

View File

@ -61,7 +61,10 @@ export const ServerList = ({
await ev.publish(); await ev.publish();
}; };
const serversToList = useMemo(() => withVirtualServers ? servers : servers.filter(s => !s.virtual), [servers, withVirtualServers]) const serversToList = useMemo(
() => (withVirtualServers ? servers : servers.filter(s => !s.virtual)),
[servers, withVirtualServers]
);
return ( return (
<> <>

View File

@ -3,5 +3,5 @@
@tailwind utilities; @tailwind utilities;
body:has(dialog[open]) { body:has(dialog[open]) {
overflow: hidden; overflow: hidden;
} }

View File

@ -1,7 +1,6 @@
import * as id3 from 'id3js'; import * as id3 from 'id3js';
import { BlobDescriptor } from 'blossom-client-sdk'; import { BlobDescriptor } from 'blossom-client-sdk';
import { ID3TagV2 } from 'id3js/lib/id3Tag'; import { ID3TagV2 } from 'id3js/lib/id3Tag';
import { Reader } from 'id3js/lib/reader';
export type AudioBlob = BlobDescriptor & { id3?: ID3Tag }; export type AudioBlob = BlobDescriptor & { id3?: ID3Tag };

View File

@ -15,7 +15,10 @@ export const useUserServers = (): Server[] => {
const pubkey = user?.npub && (nip19.decode(user?.npub).data as string); // TODO validate type 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 servers = useMemo(() => {
const serverUrls = (serverListEvent?.getMatchingTags('server').map(t => t[1]) || []).map(s => const serverUrls = (serverListEvent?.getMatchingTags('server').map(t => t[1]) || []).map(s =>