1fb1be3ddc
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
13 lines
369 B
JavaScript
13 lines
369 B
JavaScript
export const navigateToLocalePage = () => {
|
|
const allLocaleSwitcher = document.querySelector('.locale-switcher');
|
|
|
|
if (!allLocaleSwitcher) {
|
|
return false;
|
|
}
|
|
|
|
const { portalSlug } = allLocaleSwitcher.dataset;
|
|
allLocaleSwitcher.addEventListener('change', event => {
|
|
window.location = `/hc/${portalSlug}/${event.target.value}/`;
|
|
});
|
|
return false;
|
|
};
|