Skip to content
Advertisement

How can I do to disable geolocalization?

I am working using react.js and the module useposition but I would like to know how can I do to disable the popup of geolocalization if I go directlry to this path : http://localhost:3000/activation

JavaScript

I mean if I go to this route : http://localhost:3000/activation => I don’t have the popup of geolocalization

if I go to this route : http://localhost:3000 => I have the popup of gelolocalization

Could you help me please ?

Thank you very much !

Advertisement

Answer

Use the usePosition only if not in the specified path and use <Switch> to only use one of the declared routes:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement