@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
tsx 26 lines 847 Bytes
Raw
1 import { Card } from "../components/Card.tsx";
2 import { LocalTime } from "../components/LocalTime.tsx";
3 import { refreshCachedPage } from "./actions.ts";
4
5 export const revalidate = 30;
6
7 const buttonClass =
8 "mt-4 rounded-md border border-slate-200 bg-white px-3 py-1.5 text-sm text-slate-900 hover:bg-slate-50";
9
10 export default function CachedPage() {
11 return (
12 <main>
13 <h1 className="text-3xl font-bold">Cached</h1>
14 <Card title="revalidate=30">
15 <p className="text-sm text-slate-900" data-testid="isr-time">
16 Rendered at: <LocalTime cached value={new Date().toISOString()} />
17 </p>
18 <form action={refreshCachedPage}>
19 <button className={buttonClass} data-testid="isr-refresh" type="submit">
20 Refresh cache now
21 </button>
22 </form>
23 </Card>
24 </main>
25 );
26 }