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(() => {
|
useEffect(() => {
|
||||||
async function getGif() {
|
async function getGif() {
|
||||||
const response = await fetch(
|
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();
|
const { data } = await response.json();
|
||||||
console.log(data)
|
const gifUrl = data?.images?.fixed_height_small?.webp;
|
||||||
setGifUrl(data.image_webp_url);
|
setGifUrl(gifUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
getGif();
|
getGif();
|
||||||
|
|||||||
Reference in New Issue
Block a user