Skip to content

black-arm/simple-weather-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create .env file

create env file:

REACT_APP_BASE_URL=http://api.weatherstack.com
REACT_APP_ACCESS_KEY=<ACCESS_KEY>

uncomment code in thunks.ts and remove weatherMockObject:

export const fetchCurrentWeather = createAsyncThunk(
    'weather/fetchCurrentWeatherByQuery',
    async (query: string, thunkApi) =>{
        /*const response = await instance.get('/current', { params: {
            query: query,
            //language: 'it'
        }});

        return response.data;*/

        return {
            ...weatherMock,
            location: {
                ...weatherMock.location,
                name: query
            }
        };
    }
)

About

Simple weather app created with react

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published