Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
teknikattan-scoring-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tddd96-grupp1
teknikattan-scoring-system
Merge requests
!100
Resolve "Fix competition settings styling"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Fix competition settings styling"
141-fix-competition-settings-styling
into
dev
Overview
0
Commits
2
Pipelines
1
Changes
13
Merged
Emil Wahlqvist
requested to merge
141-fix-competition-settings-styling
into
dev
3 years ago
Overview
0
Commits
2
Pipelines
1
Changes
13
Expand
Closes
#141 (closed)
0
0
Merge request reports
Compare
dev
dev (base)
and
latest version
latest version
98ed35cf
2 commits,
3 years ago
13 files
+
260
−
279
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
13
Search (e.g. *.vue) (Ctrl+P)
client/src/pages/presentationEditor/components/slideSettingsComponents/Images.tsx
+
4
−
5
Options
@@ -2,14 +2,13 @@
*/
import
{
ListItem
,
ListItemText
,
Typography
}
from
'
@material-ui/core
'
import
CloseIcon
from
'
@material-ui/icons/Close
'
import
React
,
{
useState
}
from
'
react
'
import
{
useDispatch
}
from
'
react-redux
'
import
React
from
'
react
'
import
{
Center
,
HiddenInput
,
SettingsList
,
AddImageButton
,
ImportedImage
,
AddButton
}
from
'
../styled
'
import
axios
from
'
axios
'
import
{
getEditorCompetition
}
from
'
../../../../actions/editor
'
import
{
RichSlide
}
from
'
../../../../interfaces/ApiRichModels
'
import
{
ImageComponent
,
Media
}
from
'
../../../../interfaces/ApiModels
'
import
{
useAppSelector
}
from
'
../../../../hooks
'
import
{
useAppDispatch
,
useAppSelector
}
from
'
../../../../hooks
'
type
ImagesProps
=
{
activeSlide
:
RichSlide
@@ -17,7 +16,7 @@ type ImagesProps = {
}
const
Images
=
({
activeSlide
,
competitionId
}:
ImagesProps
)
=>
{
const
dispatch
=
useDispatch
()
const
dispatch
=
use
App
Dispatch
()
const
uploadFile
=
async
(
formData
:
FormData
)
=>
{
// Uploads the file to the server and creates a Media object in database.
@@ -107,7 +106,7 @@ const Images = ({ activeSlide, competitionId }: ImagesProps) => {
</
div
>
))
}
<
ListItem
button
>
<
ListItem
button
style
=
{
{
padding
:
0
}
}
>
<
HiddenInput
accept
=
"image/*"
id
=
"contained-button-file"
multiple
type
=
"file"
onChange
=
{
handleFileSelected
}
/>
<
AddImageButton
htmlFor
=
"contained-button-file"
>
<
AddButton
variant
=
"button"
>
Lägg till bild
</
AddButton
>
Loading