mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-03-26 17:52:18 +01:00
fix relay url overflowing
This commit is contained in:
parent
3ec46822dd
commit
f41b511113
@ -60,7 +60,7 @@ function RelayControl({ url }: { url: string }) {
|
||||
return (
|
||||
<Flex gap="2" alignItems="center">
|
||||
<RelayFavicon relay={url} size="xs" outline="2px solid" outlineColor={color} />
|
||||
<Link as={RouterLink} to={`/r/${encodeURIComponent(url)}`}>
|
||||
<Link as={RouterLink} to={`/r/${encodeURIComponent(url)}`} isTruncated>
|
||||
{url}
|
||||
</Link>
|
||||
<IconButton
|
||||
|
@ -8,6 +8,7 @@ import { NostrEvent } from "../../types/nostr-event";
|
||||
import useClientSideMuteFilter from "../../hooks/use-client-side-mute-filter";
|
||||
import useTimelineLoader from "../../hooks/use-timeline-loader";
|
||||
import { TORRENT_COMMENT_KIND } from "../../helpers/nostr/torrents";
|
||||
import { useUserInbox } from "../../hooks/use-user-mailboxes";
|
||||
|
||||
type NotificationTimelineContextType = {
|
||||
timeline?: TimelineLoader;
|
||||
@ -24,7 +25,8 @@ export function useNotificationTimeline() {
|
||||
|
||||
export default function NotificationTimelineProvider({ children }: PropsWithChildren) {
|
||||
const account = useCurrentAccount();
|
||||
const inbox = useReadRelays();
|
||||
const inbox = useUserInbox(account?.pubkey);
|
||||
const readRelays = useReadRelays(inbox);
|
||||
|
||||
const userMuteFilter = useClientSideMuteFilter();
|
||||
const eventFilter = useCallback(
|
||||
@ -37,7 +39,7 @@ export default function NotificationTimelineProvider({ children }: PropsWithChil
|
||||
|
||||
const timeline = useTimelineLoader(
|
||||
`${account?.pubkey ?? "anon"}-notification`,
|
||||
inbox,
|
||||
readRelays,
|
||||
account?.pubkey
|
||||
? {
|
||||
"#p": [account.pubkey],
|
||||
|
@ -40,9 +40,9 @@ function RelayLine({ relay, mode, list }: { relay: string; mode: RelayMode; list
|
||||
}, [relay, mode, list, publish]);
|
||||
|
||||
return (
|
||||
<Flex key={relay} gap="2" alignItems="center">
|
||||
<Flex key={relay} gap="2" alignItems="center" overflow="hidden">
|
||||
<RelayFavicon relay={relay} size="xs" />
|
||||
<Link as={RouterLink} to={`/r/${encodeURIComponent(relay)}`}>
|
||||
<Link as={RouterLink} to={`/r/${encodeURIComponent(relay)}`} isTruncated>
|
||||
{relay}
|
||||
</Link>
|
||||
<IconButton
|
||||
|
Loading…
x
Reference in New Issue
Block a user