Custom app launcher, browser home page, and service monitor. cute.haus
homelab react typescript
0

Configure Feed

Select the types of activity you want to include in your feed.

WEather: remove navigator.geolocation

Aly Raffauf (Apr 26, 2026, 12:06 PM EDT) 19ae0306 56e0386c

+10 -22
+10 -22
src/components/Weather.tsx
··· 45 45 const [error, setError] = useState<string | null>(null); 46 46 47 47 useEffect(() => { 48 - const fetchWeather = (lat: number, lon: number) => { 49 - fetch(`/api/weather`) 50 - .then((response) => response.json()) 51 - .then((data) => { 52 - if (data.error) { 53 - setError(data.error); 54 - } else { 55 - setWeather(data); 56 - } 57 - }) 58 - .catch(() => setError("Failed to load weather")); 59 - }; 60 - 61 - navigator.geolocation.getCurrentPosition( 62 - (position) => { 63 - fetchWeather(position.coords.latitude, position.coords.longitude); 64 - }, 65 - () => { 66 - // Fallback to Atlanta 67 - fetchWeather(33.749, -84.388); 68 - }, 69 - ); 48 + fetch(`/api/weather`) 49 + .then((response) => response.json()) 50 + .then((data) => { 51 + if (data.error) { 52 + setError(data.error); 53 + } else { 54 + setWeather(data); 55 + } 56 + }) 57 + .catch(() => setError("Failed to load weather")); 70 58 }, []); 71 59 72 60 if (error) {