mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-18 11:32:30 +02:00
fix relays not being selected on hashtag view
This commit is contained in:
@@ -27,6 +27,7 @@ import TimelineActionAndStatus from "../../components/timeline-action-and-status
|
||||
import IntersectionObserverProvider from "../../providers/intersection-observer";
|
||||
import { useTimelineCurserIntersectionCallback } from "../../hooks/use-timeline-cursor-intersection-callback";
|
||||
import GenericNoteTimeline from "../../components/generric-note-timeline";
|
||||
import { unique } from "../../helpers/array";
|
||||
|
||||
function EditableControls() {
|
||||
const { isEditing, getSubmitButtonProps, getCancelButtonProps, getEditButtonProps } = useEditableControls();
|
||||
@@ -52,6 +53,11 @@ export default function HashTagView() {
|
||||
const defaultRelays = useReadRelayUrls();
|
||||
const [selectedRelays, setSelectedRelays] = useState(defaultRelays);
|
||||
|
||||
// add the default relays to the selection when they load
|
||||
useEffect(() => {
|
||||
setSelectedRelays((a) => unique([...a, ...defaultRelays]));
|
||||
}, [defaultRelays.join("|")]);
|
||||
|
||||
const relaysModal = useDisclosure();
|
||||
const { isOpen: showReplies, onToggle } = useDisclosure();
|
||||
|
||||
|
Reference in New Issue
Block a user