Fix map apercu

This commit is contained in:
Paul Chavard 2020-05-14 13:36:25 +02:00
parent e2d72724d4
commit d44df9cc2a
2 changed files with 11 additions and 7 deletions

View file

@ -1,5 +1,6 @@
- if feature_enabled?(:new_map_editor)
= react_component("MapEditor", { featureCollection: champ.to_feature_collection, url: champs_carte_features_path(champ) }, class: "carte-#{champ.id}")
- preview = !champ.persisted?
= react_component("MapEditor", { featureCollection: champ.to_feature_collection, url: champs_carte_features_path(preview ? 'preview' : champ), preview: preview }, class: "carte-#{champ.id}")
- else
.toolbar
%button.button.primary.new-area Ajouter une zone