fix deck clickable articles
This commit is contained in:
@ -149,7 +149,9 @@ export function LongFormText(props: LongFormTextProps) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={classNames("long-form-note flex flex-col g16 p break-words")}>
|
||||
<div
|
||||
className={classNames("long-form-note flex flex-col g16 p break-words", { "cursor-pointer": props.isPreview })}
|
||||
onClick={props.onClick}>
|
||||
<ProfilePreview
|
||||
pubkey={props.ev.pubkey}
|
||||
actions={
|
||||
|
@ -1,30 +0,0 @@
|
||||
import { useContext } from "react";
|
||||
|
||||
import { useArticles } from "@/Feed/ArticlesFeed";
|
||||
import { DeckContext } from "@/Pages/Deck/DeckLayout";
|
||||
|
||||
import Note from "../Event/EventComponent";
|
||||
|
||||
const options = {
|
||||
longFormPreview: true,
|
||||
};
|
||||
|
||||
export default function Articles() {
|
||||
const data = useArticles();
|
||||
const deck = useContext(DeckContext);
|
||||
|
||||
return (
|
||||
<>
|
||||
{data.map(a => (
|
||||
<Note
|
||||
data={a}
|
||||
key={a.id}
|
||||
options={options}
|
||||
onClick={ev => {
|
||||
deck?.setArticle(ev);
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user