mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-03 14:46:37 -04:00
validate environment variables at build time
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { connection } from "next/server";
|
||||
import CountUp from "../../../components/CountUp";
|
||||
import redis from "../../../lib/helpers/redis";
|
||||
import redis from "../../../lib/redis";
|
||||
import { siteLocale } from "../../../lib/config";
|
||||
|
||||
const HitCounter = async ({ slug }: { slug: string }) => {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { env } from "../../../lib/env";
|
||||
import { Suspense } from "react";
|
||||
import { JsonLd } from "react-schemaorg";
|
||||
import { CalendarIcon, TagIcon, SquarePenIcon, EyeIcon } from "lucide-react";
|
||||
@ -20,7 +21,6 @@ import styles from "./page.module.css";
|
||||
export const dynamicParams = false;
|
||||
|
||||
// https://nextjs.org/docs/app/building-your-application/rendering/partial-prerendering#using-partial-prerendering
|
||||
// eslint-disable-next-line camelcase
|
||||
export const experimental_ppr = true;
|
||||
|
||||
export const generateStaticParams = async () => {
|
||||
@ -122,7 +122,7 @@ const Page = async ({ params }: { params: Promise<{ slug: string }> }) => {
|
||||
</div>
|
||||
|
||||
{/* only count hits on production site */}
|
||||
{process.env.NEXT_PUBLIC_VERCEL_ENV !== "development" && process.env.NODE_ENV !== "development" ? (
|
||||
{env.VERCEL_ENV === "production" ? (
|
||||
<div
|
||||
className={styles.metaItem}
|
||||
style={{
|
||||
|
Reference in New Issue
Block a user