Skip to content

Commit

Permalink
Merge branch 'preview'
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelfan committed Nov 20, 2024
2 parents aecb325 + 0ba228f commit d764e37
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/inputs/editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function Editor(props: Props) {
const [languages, setLanguages] = useState<Language[]>([]);
const [images, setImages] = useState<UploadImage[]>();
const [embedSuggestions, setEmbedSuggestions] = useState<Set<string>>(
new Set(""),
new Set("")
);
const [linkEmbed, setLinkEmbed] = useState("");
const [linkCard, setLinkCard] = useState<LinkMeta | null>(null);
Expand All @@ -49,7 +49,7 @@ export default function Editor(props: Props) {
const quoteAuthor = quote?.author.displayName || quote?.author.handle;
const placeholderText = getComposerPlaceholder(
replyTo ? "reply" : quote ? "quote" : "post",
replyAuthor ?? quoteAuthor,
replyAuthor ?? quoteAuthor
);

const editor = useEditor({
Expand Down Expand Up @@ -118,7 +118,10 @@ export default function Editor(props: Props) {
});

const hasContent =
quote || images || linkEmbed || richText.graphemeLength !== 0
quote ||
(images && images.length > 0) ||
linkEmbed ||
richText.graphemeLength !== 0
? true
: false;

Expand Down

0 comments on commit d764e37

Please sign in to comment.