Merge commit '45a996f12b04f88e0774bc6d6b52452ce39b612f' into glitch-soc/merge-upstream

This commit is contained in:
Claire committed 2025-09-11 21:20:15 +02:00
commit 9f97df84da
125 files changed
+228 -196

No files matched your search

@@ -11,7 +11,9 @@ export const ComposeQuotedStatus: FC = () => {
const quotedStatusId = useAppSelector(
(state) => state.compose.get('quoted_status_id') as string | null,
);
const isEditing = useAppSelector((state) => !!state.compose.get('id'));
const quote = useMemo(
() =>
quotedStatusId
@@ -22,16 +24,20 @@ export const ComposeQuotedStatus: FC = () => {
: null,
[quotedStatusId],
);
const dispatch = useAppDispatch();
const handleQuoteCancel = useCallback(() => {
dispatch(quoteComposeCancel());
}, [dispatch]);
if (!quote) {
return null;
}
return (
<QuotedStatus
quote={quote}
contextType='composer'
onQuoteCancel={!isEditing ? handleQuoteCancel : undefined}
/>
);