Skip to content

Commit

Permalink
Add missing create url
Browse files Browse the repository at this point in the history
  • Loading branch information
smdsgn committed Sep 20, 2024
1 parent 421e6df commit 35977bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion assets/scripts/react-roots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import SearchBar from '@components/widgets/SearchBar'
const searchBar = document.getElementById('react-search-bar')
if (searchBar)
{
const createUrl = searchBar.dataset.createUrl;
createRoot(searchBar).render(
<Provider store={store}>
<SearchBar createUrl=""/>
<SearchBar createUrl={createUrl}/>
</Provider>,
)
}
Expand Down
4 changes: 2 additions & 2 deletions home/templates/home/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h1 class="fr-mb-0">Mon Diagnostic Artificialisation vous aide à analyser et ma
</div>
</div>
</div>
<div id="react-search-bar"></div>
<div id="react-search-bar" data-create-url="{% url 'project:create' %}"></div>
</div>
</div>
</div>
Expand Down Expand Up @@ -208,7 +208,7 @@ <h3 class="text-center">D'où proviennent nos données ?</h3>
<p class="fr-text--xs text-muted">(Nous intégrons sur Mon Diagnostic Artificialisation les millésimes OCS GE en version finalisée 1.1 et 2.0)</p>
</div>
<div class="card_content">
{% comment %} <div id="react-highcharts-ocsge"></div> {% endcomment %}
<div id="react-highcharts-ocsge"></div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<div class="fr-header__tools">
<div class="fr-header__tools-links">
{% if request.resolver_match.url_name not in 'home,create,home_rapport_local' %}
<div id="react-search-bar" class="search-bar-no-home d-none d-lg-block"></div>
<div id="react-search-bar" class="search-bar-no-home d-none d-lg-block" data-create-url="{% url 'project:create' %}"></div>
{% endif %}
<ul class="fr-btns-group">
{% if request.resolver_match.url_name not in 'home,create,home_rapport_local' %}
Expand Down

0 comments on commit 35977bf

Please sign in to comment.