Skip to content

Commit

Permalink
fix(create) fix diipatch when 'Vis alle' is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindgrutle committed Nov 13, 2023
1 parent f04b646 commit 62de053
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions next-tavla/src/Admin/scenarios/Edit/components/AddTile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ function AddTile({
selectedQuay && selectedQuay?.value !== 'all'
? 'quay'
: 'stop_place'
const placeId = selectedQuay
? selectedQuay.value
: selectedStopPlace.value
const placeId =
selectedQuay && selectedQuay?.value !== 'all'
? selectedQuay.value
: selectedStopPlace.value
let name = selectedStopPlace?.label.split(',')[0] ?? ''
if (selectedQuay?.label) name = `${name} ${selectedQuay.label}`
if (selectedQuay?.label && selectedQuay.value !== 'all')
name = `${name} ${selectedQuay.label}`

addTile(name, placeId, tileType)
setSelectedStopPlace(null)
Expand Down

0 comments on commit 62de053

Please sign in to comment.