Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Also in `Settings → General → Pull Requests`:

### Release data freshness

`/download` is **prerendered**, not fetched in the browser. `components/DownloadButton.tsx` is a server component that resolves GitHub releases at render time via `lib/releases.ts`, then hands the data to `DownloadButtonClient.tsx` for the interactive bits. Visitors never call GitHub, so the page costs one upstream request per day instead of one per visitor — comfortably under GitHub's 60/hour unauthenticated limit.
`/download` is **prerendered**, not fetched in the browser. `components/DownloadPanel.tsx` is a server component that resolves GitHub releases at render time via `lib/releases.ts`, then hands the data to `DownloadButtonClient.tsx` for the interactive bits. Visitors never call GitHub, so the page costs one upstream request per day instead of one per visitor — comfortably under GitHub's 60/hour unauthenticated limit.

Refresh is driven by the cron in `vercel.json`:

Expand Down
4 changes: 2 additions & 2 deletions app/download/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Metadata } from "next";
import { Footer, Navbar } from "../../layout";
import DownloadButton from "../../components/DownloadButton";
import DownloadPanel from "../../components/DownloadPanel";

export const metadata: Metadata = {
title: "Download VoxKit",
Expand All @@ -26,7 +26,7 @@ export default function DownloadPage() {
Get the latest version of VoxKit for your operating system
</p>
</div>
<DownloadButton />
<DownloadPanel />
</div>
<Footer />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import DownloadButtonClient from "./DownloadButtonClient";
* Freshness is controlled by the page's `revalidate` plus the nightly cron in
* `app/api/revalidate-releases/route.ts`, not by this component.
*/
export default async function DownloadButton() {
export default async function DownloadPanel() {
const result = await getReleases();

if (!result.ok) {
Expand Down
2 changes: 1 addition & 1 deletion lib/releases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { fakeGitHubReleases } from "./fakeReleases";
/**
* Server-side resolution of the latest VoxKit release per OS.
*
* This runs during render (see `components/DownloadButton.tsx`), not in the
* This runs during render (see `components/DownloadPanel.tsx`), not in the
* browser, so a visitor never pays for a GitHub round trip and the download
* panel ships fully populated in the initial HTML.
*/
Expand Down
2 changes: 1 addition & 1 deletion types/releases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ export interface ReleasesAPIResponse {
lastUpdated: string;
}

export interface DownloadButtonProps {
export interface DownloadPanelProps {
className?: string;
}
Loading