I have extracted a method in ab69380 . This reduces the length of `countryClick`.
We could also try your proposition in another PR once this one is merged.