-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5af3b5e
commit aa0bcef
Showing
4 changed files
with
2 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
// This code will contain the API call rather than having it on the App.js | ||
import axios from 'axios'; | ||
|
||
const apiKey = import.meta.env.VITE_APP_UNSPLASH_API_KEY; | ||
const authorization = `Client-ID ${import.meta.env.VITE_APP_UNSPLASH_API_KEY}` | ||
|
||
export default axios.create({ | ||
baseURL: 'https://api.unsplash.com/', | ||
headers: { | ||
Authorization: `Client-ID ${apiKey}`, | ||
Authorization: authorization, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters