chore(website): sneaky sneaky

This commit is contained in:
iCrawl
2023-03-24 00:30:14 +01:00
parent d284b8c64b
commit 71eba0e1b2
7 changed files with 24 additions and 0 deletions

View File

@@ -3,8 +3,11 @@ import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight';
import { VscVersions } from '@react-icons/all-files/vsc/VscVersions';
import Link from 'next/link';
import { notFound } from 'next/navigation';
import type { ServerRuntime } from 'next/types';
import { PACKAGES } from '~/util/constants';
export const runtime: ServerRuntime = 'edge';
async function getData(pkg: string) {
if (!PACKAGES.includes(pkg)) {
notFound();

View File

@@ -3,8 +3,11 @@ import { VscArrowLeft } from '@react-icons/all-files/vsc/VscArrowLeft';
import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight';
import { VscPackage } from '@react-icons/all-files/vsc/VscPackage';
import Link from 'next/link';
import type { ServerRuntime } from 'next/types';
import { PACKAGES } from '~/util/constants';
export const runtime: ServerRuntime = 'edge';
export default function Page() {
return (
<div className="min-w-xs sm:w-md mx-auto flex min-h-screen flex-row place-content-center place-items-center gap-8 py-0 px-4 lg:py-0 lg:px-6">

View File

@@ -1,3 +1,4 @@
import { Analytics } from '@vercel/analytics/react';
import type { Metadata } from 'next/types';
import type { PropsWithChildren } from 'react';
import { Providers } from './providers';
@@ -73,6 +74,7 @@ export default function RootLayout({ children }: PropsWithChildren) {
<html className={inter.variable} lang="en" suppressHydrationWarning>
<body className="dark:bg-dark-800 bg-white">
<Providers>{children}</Providers>
<Analytics />
</body>
</html>
);