mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
refactor: fetch versions on the client
This commit is contained in:
7
apps/website/src/app/api/[package]/versions/route.ts
Normal file
7
apps/website/src/app/api/[package]/versions/route.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { NextRequest } from 'next/server';
|
||||
import { NextResponse } from 'next/server';
|
||||
import { fetchVersions } from '~/app/docAPI';
|
||||
|
||||
export async function GET(_: NextRequest, params: { package: string }) {
|
||||
return NextResponse.json(await fetchVersions(params.package));
|
||||
}
|
||||
@@ -12,8 +12,6 @@ import { resolveItemURI } from '~/components/documentation/util';
|
||||
import { N_RECENT_VERSIONS, PACKAGES } from '~/util/constants';
|
||||
import { Providers } from './providers';
|
||||
|
||||
export const revalidate = 0;
|
||||
|
||||
const Header = dynamic(async () => import('~/components/Header'));
|
||||
const Footer = dynamic(async () => import('~/components/Footer'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user