Skip to content

Commit

Permalink
chore: Bump Axios
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Nov 2, 2023
1 parent cde4cd5 commit 1466c5c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion editor.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@turf/buffer": "^6.5.0",
"@turf/helpers": "^6.5.0",
"array-move": "^4.0.0",
"axios": "0.27.2",
"axios": "^1.6.0",
"bowser": "^2.11.0",
"camelcase-keys": "^9.0.0",
"classnames": "^2.3.2",
Expand Down
10 changes: 5 additions & 5 deletions editor.planx.uk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ export default function Component(props: Props) {
<MapContainer environment={environment} size="large">
<p style={visuallyHidden}>
An interactive map centred on your address, with a red pointer
to draw your property boundary. Click to place points and connect the
lines to make your site. Once you've closed the site shape,
click and drag the lines to modify it.
to draw your property boundary. Click to place points and
connect the lines to make your site. Once you've closed the site
shape, click and drag the lines to modify it.
</p>
{!props.hideFileUpload && (
<p style={visuallyHidden}>
Expand Down
7 changes: 5 additions & 2 deletions editor.planx.uk/src/@planx/components/Send/Public.test.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import * as axios from "axios";
import Axios from "axios";
import React from "react";
import { axe, setup } from "testUtils";

import hasuraEventsResponseMock from "./mocks/hasuraEventsResponseMock";
import { Destination } from "./model";
import SendComponent from "./Public";

jest.spyOn(axios, "default").mockImplementation((url: any) => {
jest.mock("axios");
const mockAxios = Axios as jest.Mocked<typeof Axios>;

mockAxios.post.mockImplementation((url: any) => {
return {
value: url()?.startsWith(
`${process.env.REACT_APP_API_URL}/create-send-events/`,
Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/api/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function handleUpload(
"Content-Type": "multipart/form-data",
},
onUploadProgress: ({ loaded, total }) => {
if (onProgress) {
if (onProgress && total) {
onProgress(loaded / total);
}
},
Expand Down

0 comments on commit 1466c5c

Please sign in to comment.