Skip to content

Commit

Permalink
refactor: update import statements for loading animations in Chat com…
Browse files Browse the repository at this point in the history
…ponents to avoid leaking require statement into bundled esm file (#611)

Co-authored-by: xingwanying <[email protected]>
  • Loading branch information
ranwawa and xingwanying authored Dec 25, 2024
1 parent 4d7240b commit 3491b70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assistant/src/Chat/components/LoadingEnd.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Lottie from 'lottie-react';
import React, { useState } from 'react';

const LoadingAnimationEnd = require('../../assets/bubble-end.json');
import LoadingAnimationEnd from '../../assets/bubble-end.json';

interface LoadingEndProps {
children?: React.ReactNode;
Expand Down
2 changes: 1 addition & 1 deletion assistant/src/Chat/components/LoadingStart.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Lottie from 'lottie-react';
import React from 'react';
const LoadingAnimationStart = require('../../assets/bubble-start.json');
import LoadingAnimationStart from '../../assets/bubble-start.json';

interface LoadingStartProps {
loop?: boolean;
Expand Down

0 comments on commit 3491b70

Please sign in to comment.