chore: formatting

This commit is contained in:
florian 2024-05-19 11:11:43 +02:00
parent fcb4dc37e2
commit ab10ae857d
6 changed files with 9 additions and 14 deletions

View File

@ -67,7 +67,6 @@ const FileEventEditor = ({ data }: { data: FileEventData }) => {
}, [thumbnailSubscription.events]);
const publishFileEvent = async (data: FileEventData) => {
// TODO REupload selected video thumbnail from DVM
const e: NostrEvent = {

View File

@ -6,7 +6,6 @@
@apply flex flex-col self-center md:w-10/12 w-full min-h-[80vh] px-4 md:px-0;
}
.footer {
@apply justify-center gap-1 text-base-content pt-12 pb-12;
}

View File

@ -40,12 +40,7 @@ export const Layout = () => {
viewBox="0 0 24 24"
className="inline-block w-5 h-5 stroke-current"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M4 6h16M4 12h16M4 18h16"
></path>
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</button>{' '}
<ul tabIndex={0} className="dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-[11em]">
@ -73,8 +68,10 @@ export const Layout = () => {
<div className="content">{<Outlet />}</div>
<div className="footer">
<span className='whitespace-nowrap block'>made with 💜 by{' '}
<a href="https://njump.me/npub1klr0dy2ul2dx9llk58czvpx73rprcmrvd5dc7ck8esg8f8es06qs427gxc">florian</a></span>
<span className="whitespace-nowrap block">
made with 💜 by{' '}
<a href="https://njump.me/npub1klr0dy2ul2dx9llk58czvpx73rprcmrvd5dc7ck8esg8f8es06qs427gxc">florian</a>
</span>
</div>
</div>
);

View File

@ -11,8 +11,8 @@ const useBlossomServerEvents = () => {
const blossomServerEvents = useEvents(blossomServerListFilter);
const blossomServers = useMemo(() => {
const allRTags = blossomServerEvents.events.flatMap(ev =>
ev.tags.filter(t => t[0] == 'r' || t[0] == 'server').flatMap(t => ({ name: t[1] })) // TODO 'r' is deprecated
const allRTags = blossomServerEvents.events.flatMap(
ev => ev.tags.filter(t => t[0] == 'r' || t[0] == 'server').flatMap(t => ({ name: t[1] })) // TODO 'r' is deprecated
);
const cnt = countBy(
allRTags.filter(s => !s.name.match(/https?:\/\/localhost/)),

View File

@ -35,7 +35,7 @@ export const useServerInfo = () => {
const blobs = await BlossomClient.listBlobs(server.url, pubkey!, undefined, listAuthEvent);
// fallback to deprecated created attibute for servers that are not using 'uploaded' yet
return blobs.map(b => ({ ...b, uploaded: b.uploaded || b.created || dayjs().unix()}));
return blobs.map(b => ({ ...b, uploaded: b.uploaded || b.created || dayjs().unix() }));
},
enabled: !!pubkey && servers.length > 0,
staleTime: 1000 * 60 * 5,

View File

@ -22,7 +22,7 @@ export const useUserServers = (): Server[] => {
const servers = useMemo(() => {
const serverUrls = uniqAndSort(
[
...(serverListEvent?.getMatchingTags('r').map(t => t[1]) || []), // TODO 'r' is deprecated
...(serverListEvent?.getMatchingTags('r').map(t => t[1]) || []), // TODO 'r' is deprecated
...(serverListEvent?.getMatchingTags('server').map(t => t[1]) || []),
...additionalServers,
].map(s => s.toLocaleLowerCase().replace(/\/$/, ''))