Skip to content

Commit

Permalink
fix: Added datalayer validation, fixed strings
Browse files Browse the repository at this point in the history
  • Loading branch information
josebui committed May 10, 2024
1 parent 3c643b1 commit a925bb6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/localization/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@
"form_delete_chapter_confirm_title": "Delete “{{name}}”?",
"form_delete_chapter_confirm_message": "Are you sure you want to delete the chapter {{name}}?",
"form_delete_chapter_confirm_button_tooltip": "Delete chapter “{{name}}”",
"form_chapter_location_button": "Set Map Location",
"form_chapter_location_button": "Edit Map",
"form_chapter_alignment_buttons": "Set alignment",
"form_chapter_alignment_left": "Align Left",
"form_chapter_alignment_center": "Align Center",
Expand All @@ -924,7 +924,7 @@
"form_location_dialog_title": "Set map location for <1>{{title}}</1>",
"form_location_dialog_title_blank": "Set map location",
"location_dialog_cancel_button": "Cancel",
"location_dialog_confirm_button": "Set Location",
"location_dialog_confirm_button": "Save Map",
"view_title_outline": "Outline",
"breadcrumbs_view": "{{title}}",
"breadcrumbs_tool_home": "Terraso Story Maps",
Expand Down
3 changes: 3 additions & 0 deletions src/storyMap/components/StoryMapForm/ChapterForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ const ChapterForm = ({ theme, record }) => {

const onDataLayerChange = useCallback(
dataLayerConfig => {
if (!dataLayerConfig?.id) {
return;
}
const baseEvents = dataLayerConfig
? LAYER_TYPES.map(name => ({
layer: `${dataLayerConfig.id}-${name}`,
Expand Down
4 changes: 4 additions & 0 deletions src/storyMap/components/StoryMapForm/TitleForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ const TitleForm = props => {

const onDataLayerChange = useCallback(
dataLayerConfig => {
if (!dataLayerConfig?.id) {
return;
}

const baseEvents = LAYER_TYPES.map(name => ({
layer: `${dataLayerConfig.id}-${name}`,
opacity: getLayerOpacity(name, dataLayerConfig),
Expand Down

0 comments on commit a925bb6

Please sign in to comment.