Hourly forecast

This commit is contained in:
Sean Edmunds
2024-12-05 14:36:11 -06:00
parent a6a96ba901
commit 407cff06c0
11 changed files with 329 additions and 127 deletions

View File

@@ -45,6 +45,8 @@ export function useWeatherAPI({ endpoint }: { endpoint: string }) {
url = 'https://api.weather.gov/stations/KSGR/observations';
} else if (endpoint === 'forecast') {
url = 'https://api.weather.gov/gridpoints/HGX/55,96/forecast';
} else if (endpoint === 'hourly') {
url = 'https://api.weather.gov/gridpoints/HGX/55,96/forecast/hourly';
}
const callEndpoint = async (endpoint: string) => {
const options: object = {
@@ -158,7 +160,6 @@ export function useFileUploadAPI() {
endpoint: string,
body?: object | FormData | undefined | null,
) => {
const options = {
method: method,
headers: {