modifying brochureHydratation to handle user current language
This commit is contained in:
parent
d67b9c8291
commit
cc87bcc259
|
|
@ -76,7 +76,10 @@ function toggleActiveFilterButton(e) {
|
|||
}
|
||||
|
||||
async function hydrateBrochureArchiveGrid() {
|
||||
const response = await fetch(`/wp-json/homegrade-datas/v1/build/brochures-archive-rows`);
|
||||
const currentLanguage = document.querySelector('body').getAttribute('current-language');
|
||||
const response = await fetch(
|
||||
`/wp-json/homegrade-datas/v1/build/brochures-archive-rows?current-page-language=${currentLanguage}`
|
||||
);
|
||||
brochuresDatas = await response.json();
|
||||
|
||||
const brochureRows = document.querySelector('.brochures-archives #brochures-rows');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user