Skip to content

Commit

Permalink
STCOR-594 read ky timeout from stripes-config value
Browse files Browse the repository at this point in the history
  • Loading branch information
vashjs committed Oct 6, 2023
1 parent 4997ab8 commit 5eac62e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* Include `yarn.lock`. Refs STCOR-679.
* *BREAKING* bump `react-intl` to `v6.4.4`. Refs STCOR-744.
* Bump `stylelint` to `v15` and `stylelint-config-standard` to `v34`. Refs STCOR-745.
* Read ky timeout from stripes-config value. Refs STCOR-594.

## [9.0.0](https://github.com/folio-org/stripes-core/tree/v9.0.0) (2023-01-30)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v8.3.0...v9.0.0)
Expand Down
5 changes: 3 additions & 2 deletions src/useOkapiKy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import ky from 'ky';
import { useStripes } from './StripesContext';

export default () => {
const { locale = 'en', tenant, token, url } = useStripes().okapi;
const { locale = 'en', timeout = 30000, tenant, token, url } = useStripes().okapi;

return ky.create({
prefixUrl: url,
hooks: {
Expand All @@ -15,6 +16,6 @@ export default () => {
]
},
retry: 0,
timeout: 30000,
timeout,
});
};

0 comments on commit 5eac62e

Please sign in to comment.