Skip to content

Commit

Permalink
Update dependencies and form (#154)
Browse files Browse the repository at this point in the history
* Update frontend deps

* Fix form

* Update docker versions

* Update docker version

* Fix tests
  • Loading branch information
alexbrazier committed Jul 4, 2021
1 parent ca4c448 commit f028e5c
Show file tree
Hide file tree
Showing 4 changed files with 1,651 additions and 1,641 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN go build -o /go/bin/server
############################
# Build frontend
############################
FROM node:14.15.3-alpine AS frontendbuilder
FROM node:14.17-alpine AS frontendbuilder

COPY frontend /app
WORKDIR /app
Expand All @@ -26,7 +26,7 @@ RUN yarn --frozen-lockfile --network-timeout 600000 && \
############################
# Build actual image
############################
FROM alpine:3.12
FROM alpine:3.13
# Need to get updated certificates to connect to Slack API
RUN apk update && apk add bash dumb-init ca-certificates && rm -rf /var/cache/apk/*
# Copy our static executable.
Expand Down
57 changes: 28 additions & 29 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,51 +15,50 @@
"wait": "yarn wait-on http-get://localhost:1323/health http-get://localhost:3000/go"
},
"dependencies": {
"@material-ui/core": "^4.11.2",
"@material-ui/core": "^4.11.4",
"@material-ui/icons": "^4.11.2",
"@material-ui/styles": "^4.11.2",
"@sentry/browser": "^6.0.0",
"@material-ui/styles": "^4.11.4",
"@sentry/browser": "^6.8.0",
"axios": "^0.21.1",
"classnames": "^2.2.6",
"http-proxy-middleware": "^1.0.6",
"classnames": "^2.3.1",
"http-proxy-middleware": "^2.0.1",
"js-cookie": "^2.2.1",
"qs": "^6.9.6",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-redux": "^7.2.2",
"qs": "^6.10.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.1",
"redux": "^4.0.5",
"react-scripts": "4.0.3",
"redux": "^4.1.0",
"typeface-roboto": "^1.1.13"
},
"devDependencies": {
"@cypress/webpack-preprocessor": "^5.4.11",
"@types/classnames": "^2.2.11",
"@types/faker": "^5.1.5",
"@cypress/webpack-preprocessor": "^5.9.1",
"@types/classnames": "^2.3.1",
"@types/faker": "^5.5.6",
"@types/js-cookie": "^2.2.6",
"@types/qs": "^6.9.5",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react-redux": "^7.1.15",
"@types/qs": "^6.9.6",
"@types/react": "^17.0.13",
"@types/react-dom": "^17.0.8",
"@types/react-redux": "^7.1.16",
"@types/react-router-dom": "^5.1.7",
"@types/recompose": "^0.30.7",
"babel-eslint": "^10.1.0",
"cypress": "^6.3.0",
"eslint": "^7.18.0",
"cypress": "^7.6.0",
"eslint": "^7.30.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-plugin-cypress": "^2.11.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-cypress": "^2.11.3",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.22.0",
"faker": "^5.1.0",
"prettier": "^2.2.1",
"eslint-plugin-react": "^7.24.0",
"faker": "^5.5.3",
"prettier": "^2.3.2",
"ts-loader": "^8.0.14",
"typescript": "^4.1.3",
"wait-on": "^5.2.1"
"typescript": "^4.3.5",
"wait-on": "^6.0.0"
},
"resolutions": {
"set-value": "^3.0.1",
"immer": "^8.0.1"
"set-value": "^3.0.1"
},
"eslintConfig": {
"extends": "react-app"
Expand Down
80 changes: 44 additions & 36 deletions frontend/src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,48 +55,56 @@ const Modal: React.FC<ModalProps> = ({
}, [query, displayFlashSuccess, displayFlashError, onClose, edit]);
return (
<Dialog open onClose={onClose} data-e2e="modal">
<DialogTitle>{edit ? `Edit ${urlKey}` : 'Add new url'}</DialogTitle>
<DialogContent>
<DialogContentText>
{edit
? `You are editing the link for "${urlKey}". Please remember that this will change the url for everyone, so only do so if the url is wrong.`
: 'Enter key and url to add new link'}
</DialogContentText>
{!edit && (
<form
onSubmit={(e) => {
e.preventDefault();
submit({ urlKey, url });
}}
>
<DialogTitle>{edit ? `Edit ${urlKey}` : 'Add new url'}</DialogTitle>
<DialogContent>
<DialogContentText>
{edit
? `You are editing the link for "${urlKey}". Please remember that this will change the url for everyone, so only do so if the url is wrong.`
: 'Enter key and url to add new link'}
</DialogContentText>
{!edit && (
<TextField
id="key"
label="Key"
type="text"
className={classes.textField}
fullWidth
autoComplete="off"
onChange={(e) => setKey(e.target.value)}
value={urlKey}
/>
)}
<TextField
id="key"
label="Key"
id="url"
label="Url"
type="text"
className={classes.textField}
fullWidth
autoComplete="off"
onChange={(e) => setKey(e.target.value)}
value={urlKey}
onChange={(e) => setUrl(e.target.value)}
value={url}
/>
)}
<TextField
id="url"
label="Url"
type="text"
className={classes.textField}
fullWidth
autoComplete="off"
onChange={(e) => setUrl(e.target.value)}
value={url}
/>
</DialogContent>
<DialogActions className={classes.actions}>
<Button onClick={onClose} color="secondary" data-e2e="cancel">
Cancel
</Button>
<Button
onClick={() => submit({ urlKey, url })}
color="primary"
data-e2e="submit"
>
{edit ? 'Update' : 'Add'}
</Button>
</DialogActions>
</DialogContent>
<DialogActions className={classes.actions}>
<Button
onClick={onClose}
color="secondary"
data-e2e="cancel"
type="button"
>
Cancel
</Button>
<Button type="submit" color="primary" data-e2e="submit">
{edit ? 'Update' : 'Add'}
</Button>
</DialogActions>
</form>
</Dialog>
);
};
Expand Down
Loading

0 comments on commit f028e5c

Please sign in to comment.