This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[04] Fix not building because of broken CONSUMET API
- Loading branch information
1 parent
0820c9f
commit 4a94b78
Showing
4 changed files
with
23 additions
and
25 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
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,17 +1,18 @@ | ||
--- | ||
import Layout from '../layouts/Layout.astro'; | ||
import Header from '../components/Header.astro'; | ||
import Banner from '../components/anime/Banner.astro'; | ||
import Section from '../components/Section.astro'; | ||
import Layout from "../layouts/Layout.astro"; | ||
import Header from "../components/Header.astro"; | ||
import Banner from "../components/anime/Banner.astro"; | ||
import Section from "../components/Section.astro"; | ||
const fetchAnime = await fetch('https://api.consumet.org/meta/anilist/info/140960').then(r => r.json()); | ||
const trendingAnime = await fetch('https://api.consumet.org/meta/anilist/trending').then(r => r.json()); | ||
const popularAnime = await fetch('https://api.consumet.org/meta/anilist/popular').then(r => r.json()); | ||
const API_DOWN = "API IS CURRENTLY DOWN. PLEASE CHECK BACK LATER~"; | ||
const fetchAnime = await fetch("https://api.consumet.org/meta/anilist/info/140960").then((r) => r.json()); | ||
const trendingAnime = await fetch("https://api.consumet.org/meta/anilist/trending").then((r) => r.json()); | ||
const popularAnime = await fetch("https://api.consumet.org/meta/anilist/popular").then((r) => r.json()); | ||
--- | ||
|
||
<Layout> | ||
<Header/> | ||
<Banner anime={fetchAnime}/> | ||
<Section title="Trending Now" animeList={trendingAnime.results}/> | ||
<Section title="Popular" animeList={popularAnime.results}/> | ||
<Header /> | ||
{fetchAnime.message ? API_DOWN : <Banner anime={fetchAnime}/>} | ||
{trendingAnime.message ? API_DOWN : <Section title="Trending Now" animeList={trendingAnime.results}/>} | ||
{popularAnime.message ? API_DOWN : <Section title="Popular" animeList={popularAnime.results} />} | ||
</Layout> | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,4 @@ module.exports = { | |
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [ | ||
require('@tailwindcss/line-clamp') | ||
], | ||
} |