mirror of https://github.com/buster-so/buster.git
Remove unused animation prop
This commit is contained in:
parent
ffc255c5d6
commit
b618bf53fa
|
@ -7,7 +7,6 @@ type TokenizedTextProps = {
|
|||
animation?: MarkdownAnimation;
|
||||
animationDuration?: number;
|
||||
animationTimingFunction?: 'ease-in-out' | 'ease-in' | 'ease-out' | 'linear';
|
||||
doNotAnimateInitialText?: boolean;
|
||||
isStreamFinished?: boolean;
|
||||
};
|
||||
|
||||
|
@ -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(() => {
|
||||
|
|
|
@ -66,9 +66,7 @@ export const animateTokenizedText = (
|
|||
animationsProps: Pick<
|
||||
AnimatedMarkdownProps,
|
||||
'animation' | 'animationDuration' | 'animationTimingFunction' | 'isStreamFinished'
|
||||
> & {
|
||||
doNotAnimateInitialText?: boolean;
|
||||
}
|
||||
>
|
||||
) => {
|
||||
if (!animationsProps.animation) {
|
||||
return text;
|
||||
|
|
Loading…
Reference in New Issue