Revalidate buttons quicker

This commit is contained in:
MeowcaTheoRange 2024-06-10 16:32:28 -05:00
parent 614cc93b7e
commit 7715d0d5db

View file

@ -3,7 +3,12 @@ import Link from "next/link";
import Searchbar from "@/components/Searchbar/Searchbar"; import Searchbar from "@/components/Searchbar/Searchbar";
export default async function Home() { export default async function Home() {
const buttons = await fetch("https://cdn.abtmtr.link/site_content/buttons.json", { next: { revalidate: 3600 } }).then(x=>x.json()).catch(_ => null); const buttons = await fetch(
"https://cdn.abtmtr.link/site_content/buttons.json",
{ next: { revalidate: 60 } }
)
.then((x) => x.json())
.catch((_) => null);
const data = await fetch("https://pronouns.cc/api/v1/users/mtr", { next: { revalidate: 3600 } }).then(x=>x.json()).catch(_ => null); const data = await fetch("https://pronouns.cc/api/v1/users/mtr", { next: { revalidate: 3600 } }).then(x=>x.json()).catch(_ => null);
const domains = await fetch("https://cdn.abtmtr.link/site_content/domain.json", { next: { revalidate: 3600 } }) const domains = await fetch("https://cdn.abtmtr.link/site_content/domain.json", { next: { revalidate: 3600 } })
.then(x=>x.json()).catch(_ => "[]"); .then(x=>x.json()).catch(_ => "[]");