Commit bcd1daca authored by Marek Veselý's avatar Marek Veselý
Browse files

Merge branch '745-follow-up-from-resolve-chore-new-version-of-backend-v3-21-0' into 'main'

Fixed typo

Closes #745

See merge request inject/frontend!647
parents 2f48dead fa73f411
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -32,7 +32,7 @@ interface DefinitionButtonsProps {


const DefinitionButtons: FC<DefinitionButtonsProps> = ({ definition }) => {
const DefinitionButtons: FC<DefinitionButtonsProps> = ({ definition }) => {
  const [alertOpen, setAlertOpen] = useState(false)
  const [alertOpen, setAlertOpen] = useState(false)
  const [donwloadLoading, setDonwloadLoading] = useState(false)
  const [downloadLoading, setDownloadLoading] = useState(false)
  const host = useHost()
  const host = useHost()


  const { id: definitionId } = definition
  const { id: definitionId } = definition
@@ -41,7 +41,7 @@ const DefinitionButtons: FC<DefinitionButtonsProps> = ({ definition }) => {
    useTypedMutation(DeleteDefinition)
    useTypedMutation(DeleteDefinition)


  const onDownload = () => {
  const onDownload = () => {
    setDonwloadLoading(true)
    setDownloadLoading(true)


    authenticatedFetch(downloadDefinitionUrl(host, definition.id))
    authenticatedFetch(downloadDefinitionUrl(host, definition.id))
      .then(response => response.blob())
      .then(response => response.blob())
@@ -57,7 +57,7 @@ const DefinitionButtons: FC<DefinitionButtonsProps> = ({ definition }) => {
        notify(error.message, JSON.stringify(error), { intent: 'danger' })
        notify(error.message, JSON.stringify(error), { intent: 'danger' })
      )
      )
      .finally(() => {
      .finally(() => {
        setDonwloadLoading(false)
        setDownloadLoading(false)
      })
      })
  }
  }


@@ -75,7 +75,7 @@ const DefinitionButtons: FC<DefinitionButtonsProps> = ({ definition }) => {
          icon='download'
          icon='download'
          fill
          fill
          title='Download'
          title='Download'
          loading={donwloadLoading}
          loading={downloadLoading}
          onClick={onDownload}
          onClick={onDownload}
        />
        />
        <Button
        <Button