Remove unused animation prop

This commit is contained in:
Nate Kelley 2025-07-22 09:27:03 -06:00
parent ffc255c5d6
commit b618bf53fa
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
2 changed files with 5 additions and 8 deletions

View File

@ -7,8 +7,7 @@ type TokenizedTextProps = {
animation?: MarkdownAnimation;
animationDuration?: number;
animationTimingFunction?: 'ease-in-out' | 'ease-in' | 'ease-out' | 'linear';
doNotAnimateInitialText?: boolean;
isStreamFinished?: boolean;
isStreamFinished?: boolean;
};
const TokenizedText: React.FC<TokenizedTextProps> = React.memo(
@ -17,7 +16,7 @@ const TokenizedText: React.FC<TokenizedTextProps> = React.memo(
animation,
animationDuration,
animationTimingFunction,
doNotAnimateInitialText,
isStreamFinished
}) => {
const previousTextRef = useRef<string>('');
@ -41,11 +40,11 @@ const TokenizedText: React.FC<TokenizedTextProps> = React.memo(
<span
key={`animated-chunk-${index}`}
className={chunk.trim().length > 0 ? 'whitespace-pre-wrap' : ''}
style={doNotAnimateInitialText && index === 0 ? {} : animationStyle}>
style={ animationStyle}>
{chunk}
</span>
),
[animationStyle, doNotAnimateInitialText]
[animationStyle, ]
);
const content = useMemo(() => {

View File

@ -66,9 +66,7 @@ export const animateTokenizedText = (
animationsProps: Pick<
AnimatedMarkdownProps,
'animation' | 'animationDuration' | 'animationTimingFunction' | 'isStreamFinished'
> & {
doNotAnimateInitialText?: boolean;
}
>
) => {
if (!animationsProps.animation) {
return text;