Skip to content

Commit

Permalink
no image uploader now...
Browse files Browse the repository at this point in the history
  • Loading branch information
jerome-diver committed Aug 8, 2021
1 parent 3f0c450 commit d0d4608
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 54 deletions.
20 changes: 1 addition & 19 deletions frontend/Views/Pages/public/Containers.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { useParams } from 'react-router-dom'
import { trContainer, colorType } from '../../helpers/config'
import { Card, CardGroup, Jumbotron, Badge, Button, Form, InputGroup, Image, Figure, Modal } from 'react-bootstrap'
import loadable from '@loadable/component'
import ImageUploading from 'react-images-uploading'

import { actionsContainerLinks, actionsContainer } from './compositions/containers.actions'
import { statesContainerLinks, statesContainer, useFetch } from './compositions/containers.states'
Expand Down Expand Up @@ -150,24 +149,7 @@ const HeadContainerUIedit = ( {t, i18n,
<Form.Text className="text-muted">{t('containers.helper.title')}</Form.Text>
</Form.Group>

<ImageUploading multiple value={form.image} onChange={change}
maxNumber='1' dataURLKey="data_url">
{({ onImageUpload, onImageRemove, isDragging, dragProps }) => (
<div id='drop-area' className="upload__image-wrapper">
<button style={isDragging ? { color: 'red' } : undefined}
onClick={onImageUpload}
{...dragProps} >
Click or Drop here
</button>
&nbsp;
<div className="image-item">
<Image rounded fluid src={form.image} />
<button onClick={() => onImageRemove(0)}>Remove</button>
</div>
</div>
)}
</ImageUploading>

<Image rounded fluid src={form.image} />

<Form.Group controlId="formBasicText">
<Form.Label>{t('containers.update.content')}</Form.Label>
Expand Down
10 changes: 0 additions & 10 deletions frontend/stylesheet/app.sass
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ body
.for-container
flex-grow: 1

#drop-area
border: 2px dashed #ccc
border-radius: 20px
font-family: sans-serif
margin: 100px auto
padding: 20px

#drop-area.highlight
border-color: purple

#root
width: 100%
height: calc(100% - 2.1rem)
Expand Down
19 changes: 0 additions & 19 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"react-dom": "^17.0.2",
"react-hot-loader": "^4.13.0",
"react-i18next": "^11.8.11",
"react-images-uploading": "^3.1.3",
"react-redux": "^7.2.3",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15665,11 +15665,6 @@
"@babel/runtime" "^7.13.6"
"html-parse-stringify2" "^2.0.1"

"react-images-uploading@^3.1.3":
"integrity" "sha512-Ak9uaHTsCM6JboEo5JU0esx13IxQuZ1ZxgWgdqVIsK5ZSty88lcf1CTxpMTZFZVVuIxWOm9VsRvs6cyMUDTWeg=="
"resolved" "https://registry.npmjs.org/react-images-uploading/-/react-images-uploading-3.1.3.tgz"
"version" "3.1.3"

"react-inline-css@^2.3.0":
"integrity" "sha1-hKNjBcmR9kK38lx1/KzNT/yw3gc="
"resolved" "https://registry.npmjs.org/react-inline-css/-/react-inline-css-2.3.1.tgz"
Expand Down

0 comments on commit d0d4608

Please sign in to comment.