[Glitch] Composer quote improvements

Port f85f0eee1b to glitch-soc

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Co-authored-by: diondiondion <mail@diondiondion.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Echo
2025-08-21 16:07:31 +02:00
committed by Claire
parent 5cac4dfb5c
commit be78b64948
14 changed files with 363 additions and 96 deletions

View File

@@ -63,12 +63,21 @@ type GetStatusSelector = (
props: { id?: string | null; contextType?: string },
) => Status | null;
export const QuotedStatus: React.FC<{
interface QuotedStatusProps {
quote: QuoteMap;
contextType?: string;
variant?: 'full' | 'link';
nestingLevel?: number;
}> = ({ quote, contextType, nestingLevel = 1, variant = 'full' }) => {
onQuoteCancel?: () => void; // Used for composer.
}
export const QuotedStatus: React.FC<QuotedStatusProps> = ({
quote,
contextType,
nestingLevel = 1,
variant = 'full',
onQuoteCancel,
}) => {
const dispatch = useAppDispatch();
const quotedStatusId = quote.get('quoted_status');
const quoteState = quote.get('state');
@@ -160,6 +169,7 @@ export const QuotedStatus: React.FC<{
id={quotedStatusId}
contextType={contextType}
avatarSize={32}
onQuoteCancel={onQuoteCancel}
>
{canRenderChildQuote && (
<QuotedStatus