Hourly forecast
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user