JSFiddle - React, Tailwind, and code Playground

by mtenschert

CSS

span.important-label.important-label--person-select {
  position: unset;
}

span.person-menu__age {
  margin-bottom: 10px;
  display: inline-block;
  border-radius: .3em;
  background: #b62125;
  padding: .2em .5em;
  color: #fff;
}

.person-menu__person--active {
  background-color: #ffffff;
  height: unset;
}

JavaScript

$(document).ready(function() {

    var initial_zendesk_totalPath = window.location.pathname;
    var initial_zendesk_paths = initial_zendesk_totalPath.split("/"); // string to [en, ski-rental, france, ...]
    var initial_zendesk_paths_lang_country_paths_ready = initial_zendesk_paths[2];
    var initial_zendesk_paths_lang_country = initial_zendesk_paths_lang_country_paths_ready.split("-"); // extract page name
    var initial_zendesk_lang = initial_zendesk_paths_lang_country[0];

    if (initial_zendesk_lang == "en") {
      window.setTimeout(function() {
        window.location.href = "https://skisupport.zendesk.com/hc/en-us/requests/new?ticket_form_id=360000031318";
      }, 2000);
    } else if (initial_zendesk_lang == "de") {
      window.setTimeout(function() {
        window.location.href = "https://skisupport.zendesk.com/hc/de/requests/new?ticket_form_id=360000031318";
      }, 2000);
    } else if (initial_zendesk_lang == "fr") {
      window.setTimeout(function() {
        window.location.href = "https://skisupport.zendesk.com/hc/fr/requests/new?ticket_form_id=360000031318";
      }, 2000);
    } else if (initial_zendesk_lang == "nl") {
      window.setTimeout(function() {
        window.location.href = "https://skisupport.zendesk.com/hc/nl/requests/new?ticket_form_id=360000031318";
      }, 2000);
    } else if (initial_zendesk_lang == "it") {
      window.setTimeout(function() {
        window.location.href = "https://skisupport.zendesk.com/hc/it/requests/new?ticket_form_id=360000031318";
      }, 2000);
    }

  });