[Glitch] Upgrades to React 19.2

Port ccd6fb92f9 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Echo authored and Claire committed 2026-06-17 14:46:18 +02:00
1 parent 1e7fec004d
commit cc2aec8b0a
2 files changed
+22 -16

No files matched your search

@@ -1,4 +1,5 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import type { ComponentType, ReactNode } from 'react';
import { defineMessage, FormattedMessage, useIntl } from 'react-intl';
@@ -143,6 +144,21 @@ const FilteredQuote: React.FC<{
);
};
// Adds a wrapper around StatusContainer as the types aren't inheriting correctly with Redux + React 19.
// TODO: Remove this after the Status component is in TS.
interface StatusContainerForQuotesProps {
id?: string | null;
contextType?: string;
isQuotedPost?: boolean;
avatarSize?: number;
headerRenderFn?: StatusHeaderRenderFn;
children?: ReactNode;
[key: string]: unknown;
}
const StatusContainerWithChildren =
StatusContainer as unknown as ComponentType<StatusContainerForQuotesProps>;
interface QuotedStatusProps {
quote: QuoteMap;
contextType?: string;
@@ -339,7 +355,7 @@ export const QuotedStatus: React.FC<QuotedStatusProps> = ({
return (
<div className='status__quote'>
<StatusContainer
<StatusContainerWithChildren
isQuotedPost
id={quotedStatusId}
contextType={contextType}
@@ -357,7 +373,7 @@ export const QuotedStatus: React.FC<QuotedStatusProps> = ({
nestingLevel={nestingLevel + 1}
/>
)}
</StatusContainer>
</StatusContainerWithChildren>
</div>
);
};
@@ -384,17 +400,15 @@ export const StatusQuoteManager = (props: StatusQuoteManagerProps) => {
if (quote) {
return (
/* @ts-expect-error Status is not yet typed */
<StatusContainer {...props}>
<StatusContainerWithChildren {...props}>
<QuotedStatus
quote={quote}
parentQuotePostId={status?.get('id') as string}
contextType={props.contextType}
/>
</StatusContainer>
</StatusContainerWithChildren>
);
}
/* @ts-expect-error Status is not yet typed */
return <StatusContainer {...props} />;
return <StatusContainerWithChildren {...props} />;
};