mirror of
https://github.com/tomru/advcal.git
synced 2026-03-03 06:27:17 +01:00
giphy api changed heavily
This commit is contained in:
@@ -5,11 +5,11 @@ const Header = () => {
|
||||
useEffect(() => {
|
||||
async function getGif() {
|
||||
const response = await fetch(
|
||||
"//api.giphy.com/v1/gifs/random?tag=christmas&api_key=3ziHSa4ptYJdv2dOuawgzpBhhiW09Ss1"
|
||||
"https://api.giphy.com/v1/gifs/random?tag=christmas&api_key=3ziHSa4ptYJdv2dOuawgzpBhhiW09Ss1"
|
||||
);
|
||||
const { data } = await response.json();
|
||||
console.log(data)
|
||||
setGifUrl(data.image_webp_url);
|
||||
const gifUrl = data?.images?.fixed_height_small?.webp;
|
||||
setGifUrl(gifUrl);
|
||||
}
|
||||
|
||||
getGif();
|
||||
|
||||
Reference in New Issue
Block a user