add next revalidation to data endpoints
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ import RecentBook from "@/components/DataComponents/RecentBook";
|
|||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
<div className="">
|
<div className="select-none">
|
||||||
<section id="about">
|
<section id="about">
|
||||||
<div className="mx-auto text-center p-10">
|
<div className="mx-auto text-center p-10">
|
||||||
<div className="mx-auto grid gap-4 grid-cols-1 lg:grid-cols-2 lg:w-1/2">
|
<div className="mx-auto grid gap-4 grid-cols-1 lg:grid-cols-2 lg:w-1/2">
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ import type { ContentTrackerItem } from '@/utils/types';
|
|||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
const { data } = await fetch("https://api.alexav.gg/v4/tracker/latest/book", {
|
const { data } = await fetch("https://api.alexav.gg/v4/tracker/latest/book", {
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
next: { revalidate: 60 }
|
||||||
}).then((res) => res.json())
|
}).then((res) => res.json())
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ import type { MedalClip } from '@/utils/types';
|
|||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
const { data } = await fetch("https://api.alexav.gg/v4/social/medal", {
|
const { data } = await fetch("https://api.alexav.gg/v4/social/medal", {
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
next: { revalidate: 60 }
|
||||||
}).then((res) => res.json())
|
}).then((res) => res.json())
|
||||||
return data[0]
|
return data[0]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ import type { GameData } from '@/utils/types';
|
|||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
const { data } = await fetch("https://api.alexav.gg/v4/game", {
|
const { data } = await fetch("https://api.alexav.gg/v4/game", {
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
next: { revalidate: 60 }
|
||||||
}).then((res) => res.json())
|
}).then((res) => res.json())
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|||||||
@@ -3,8 +3,10 @@ import type { MusicData } from '@/utils/types';
|
|||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
const { data } = await fetch("https://api.alexav.gg/v4/social/music", {
|
const { data } = await fetch("https://api.alexav.gg/v4/social/music", {
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
next: { revalidate: 60 }
|
||||||
}).then((res) => res.json())
|
}).then((res) => res.json())
|
||||||
|
|
||||||
return data.tracks[0]
|
return data.tracks[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ import type { WatchData } from '@/utils/types';
|
|||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
const data = await fetch("https://api.alexav.gg/v4/tracker/latest/tv", {
|
const data = await fetch("https://api.alexav.gg/v4/tracker/latest/tv", {
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
next: { revalidate: 60 }
|
||||||
});
|
});
|
||||||
return await data.json()
|
return await data.json()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user