Prettier
This commit is contained in:
@ -25,8 +25,8 @@ import useLogin from "Hooks/useLogin";
|
||||
type Cols = "notes" | "articles" | "media" | "streams" | "notifications";
|
||||
|
||||
interface DeckScope {
|
||||
thread?: NostrLink,
|
||||
setThread: (e?: NostrLink) => void
|
||||
thread?: NostrLink;
|
||||
setThread: (e?: NostrLink) => void;
|
||||
}
|
||||
|
||||
export const DeckContext = createContext<DeckScope | undefined>(undefined);
|
||||
@ -35,7 +35,7 @@ export function SnortDeckLayout() {
|
||||
const login = useLogin();
|
||||
const navigate = useNavigate();
|
||||
const [deckScope, setDeckScope] = useState<DeckScope>({
|
||||
setThread: (e?: NostrLink) => setDeckScope(s => ({ ...s, thread: e }))
|
||||
setThread: (e?: NostrLink) => setDeckScope(s => ({ ...s, thread: e })),
|
||||
});
|
||||
|
||||
useLoginFeed();
|
||||
|
@ -1,14 +1,6 @@
|
||||
import "./Notifications.css";
|
||||
import { useEffect, useMemo, useSyncExternalStore } from "react";
|
||||
import {
|
||||
EventExt,
|
||||
EventKind,
|
||||
NostrEvent,
|
||||
NostrLink,
|
||||
NostrPrefix,
|
||||
TaggedNostrEvent,
|
||||
parseZap,
|
||||
} from "@snort/system";
|
||||
import { EventExt, EventKind, NostrEvent, NostrLink, NostrPrefix, TaggedNostrEvent, parseZap } from "@snort/system";
|
||||
import { unwrap } from "@snort/shared";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
import { useInView } from "react-intersection-observer";
|
||||
|
@ -142,9 +142,16 @@ export const NotesTab = () => {
|
||||
<>
|
||||
<FollowsHint />
|
||||
<TaskList />
|
||||
<TimelineFollows postsOnly={true} noteOnClick={deckContext ? (ev) => {
|
||||
deckContext.setThread(NostrLink.fromEvent(ev));
|
||||
} : undefined} />
|
||||
<TimelineFollows
|
||||
postsOnly={true}
|
||||
noteOnClick={
|
||||
deckContext
|
||||
? ev => {
|
||||
deckContext.setThread(NostrLink.fromEvent(ev));
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user