aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-12-06 17:17:17 -0500
committerbobzel <zzzman@gmail.com>2023-12-06 17:17:17 -0500
commit8d8878037c9d1aaee18b10bd744f993cb4d3e7c1 (patch)
treec93f402821f8a5481c7442f2d5d1f2ceb6f093ae /src/client
parente5c2c25f9d27e718eb34ec5f05c72c4cd1c22987 (diff)
got rid of some unused packages. switche to react-type-animation from react-typist for gpt.
Diffstat (limited to 'src/client')
-rw-r--r--src/client/views/pdf/GPTPopup/GPTPopup.tsx25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/client/views/pdf/GPTPopup/GPTPopup.tsx b/src/client/views/pdf/GPTPopup/GPTPopup.tsx
index cce67fed2..0cda36509 100644
--- a/src/client/views/pdf/GPTPopup/GPTPopup.tsx
+++ b/src/client/views/pdf/GPTPopup/GPTPopup.tsx
@@ -4,7 +4,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { action, observable } from 'mobx';
import { observer } from 'mobx-react';
import ReactLoading from 'react-loading';
-import Typist from 'react-typist';
+import { TypeAnimation } from 'react-type-animation';
import { Doc } from '../../../../fields/Doc';
import { DocUtils, Docs } from '../../../documents/Documents';
import { Button, IconButton, Type } from 'browndash-components';
@@ -218,17 +218,18 @@ export class GPTPopup extends React.Component<GPTPopupProps> {
<div className="content-wrapper">
{!this.loading &&
(!this.done ? (
- <Typist
- key={this.text}
- avgTypingDelay={15}
- cursor={{ hideWhenDone: true }}
- onTypingDone={() => {
- setTimeout(() => {
- this.setDone(true);
- }, 500);
- }}>
- {this.text}
- </Typist>
+ <TypeAnimation
+ speed={50}
+ sequence={[
+ this.text,
+ () => {
+ setTimeout(() => {
+ this.setDone(true);
+ }, 500);
+ },
+ ]}
+ //cursor={{ hideWhenDone: true }}
+ />
) : (
this.text
))}