function useClock() { function fmt() { var d = new Date(); var h = d.getHours().toString().padStart(2,'0'); var m = d.getMinutes().toString().padStart(2,'0'); var off = -d.getTimezoneOffset(); var sign = off >= 0 ? '+' : '-'; var oh = Math.floor(Math.abs(off)/60); var om = Math.abs(off)%60; return h+':'+m+' GMT'+sign+oh+(om?':'+String(om).padStart(2,'0'):''); } var [t, setT] = React.useState(fmt); React.useEffect(function(){ var id = setInterval(function(){ setT(fmt()); }, 30000); return function(){ clearInterval(id); }; }, []); return t; } function Entry({ onEnter }) { const clock = useClock(); const [selected, setSelected] = React.useState("USD"); const [winW, setWinW] = React.useState(window.innerWidth); React.useEffect(function() { function handle() { setWinW(window.innerWidth); } window.addEventListener('resize', handle); return function() { window.removeEventListener('resize', handle); }; }, []); const isMobile = winW < 640; const featured = ["USD", "EUR", "GBP", "CAD", "JPY", "CHF", "AUD", "CNY"]; const all = window.CURRENCIES; const selMeta = all.find(function(x){ return x.code === selected; }) || {}; return (
Real-time exchange rates for 46 currencies, on a single interactive map.
Real-time exchange rates for 46 currencies across 52 countries — visualised on a single interactive globe.
{/* Stats */}