๐Ÿ“ฆ cloudflare / vinext

๐Ÿ“„ page.tsx ยท 19 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19import { RevalidateForm } from "./revalidate-form";

async function getData() {
  // Simulate an async data fetch that returns a unique timestamp
  await new Promise((resolve) => setTimeout(resolve, 50));
  return Date.now();
}

export default async function RevalidatePage() {
  const time = await getData();
  return (
    <div>
      <h1>Revalidate Test</h1>
      <div id="time">{time}</div>
      <RevalidateForm />
    </div>
  );
}