Merge pull request #7275 from overleaf/ds-shared-loading-spinner-2

Changed LoadingSpinner default delay

GitOrigin-RevId: 2bf499585e3394e5c6b8ed9583add7ef6f678fc1
This commit is contained in:
June Kelly 2022-04-07 09:58:48 +01:00 committed by Copybot
parent 9e6b1fbb67
commit dc6f480843
3 changed files with 3 additions and 3 deletions

View file

@ -71,7 +71,7 @@ const ChatPane = React.memo(function ChatPane() {
> >
<div> <div>
<h2 className="sr-only">{t('chat')}</h2> <h2 className="sr-only">{t('chat')}</h2>
{status === 'pending' && <LoadingSpinner />} {status === 'pending' && <LoadingSpinner delay={500} />}
{shouldDisplayPlaceholder && <Placeholder />} {shouldDisplayPlaceholder && <Placeholder />}
<MessageList <MessageList
messages={messages} messages={messages}

View file

@ -27,7 +27,7 @@ function PdfPreviewPane() {
function LoadingPreview() { function LoadingPreview() {
return ( return (
<div className="pdf-loading-spinner-container"> <div className="pdf-loading-spinner-container">
<LoadingSpinner /> <LoadingSpinner delay={500} />
</div> </div>
) )
} }

View file

@ -3,7 +3,7 @@ import Icon from './icon'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
function LoadingSpinner({ delay = 500 }) { function LoadingSpinner({ delay = 0 }) {
const { t } = useTranslation() const { t } = useTranslation()
const [show, setShow] = useState(false) const [show, setShow] = useState(false)