mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-09-18 14:45:32 -04:00
clean up remaining NEXT_PUBLIC_ environment variables
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
import { env } from "../../lib/env";
|
||||
import Giscus from "@giscus/react";
|
||||
import * as config from "../../lib/config";
|
||||
import type { GiscusProps } from "@giscus/react";
|
||||
|
||||
export type CommentsProps = {
|
||||
@@ -21,7 +20,7 @@ const Comments = ({ title }: CommentsProps) => {
|
||||
|
||||
return (
|
||||
<Giscus
|
||||
repo={config.githubRepo as GiscusProps["repo"]}
|
||||
repo={env.NEXT_PUBLIC_GITHUB_REPO as GiscusProps["repo"]}
|
||||
repoId={env.NEXT_PUBLIC_GISCUS_REPO_ID}
|
||||
term={title}
|
||||
category="Comments"
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { env } from "../../lib/env";
|
||||
import clsx from "clsx";
|
||||
import { HeartIcon } from "lucide-react";
|
||||
import Link from "../Link";
|
||||
import * as config from "../../lib/config";
|
||||
import { RELEASE_TIMESTAMP } from "../../lib/config/constants";
|
||||
import type { ComponentPropsWithoutRef } from "react";
|
||||
|
||||
import styles from "./Footer.module.css";
|
||||
@@ -22,7 +22,7 @@ const Footer = ({ className, ...rest }: FooterProps) => {
|
||||
<Link href="/previously" title="Previously on..." plain className={styles.link}>
|
||||
{config.copyrightYearStart}
|
||||
</Link>{" "}
|
||||
– {new Date(RELEASE_TIMESTAMP).getUTCFullYear()}.
|
||||
– {new Date().getUTCFullYear()}.
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -53,7 +53,7 @@ const Footer = ({ className, ...rest }: FooterProps) => {
|
||||
</Link>
|
||||
.{" "}
|
||||
<Link
|
||||
href={`https://github.com/${config.githubRepo}`}
|
||||
href={`https://github.com/${env.NEXT_PUBLIC_GITHUB_REPO}`}
|
||||
title="View Source on GitHub"
|
||||
plain
|
||||
className={clsx(styles.link, styles.underline)}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { env } from "../../lib/env";
|
||||
import { format, formatISO } from "date-fns";
|
||||
import { enUS } from "date-fns/locale";
|
||||
import { tz } from "@date-fns/tz";
|
||||
import { utc } from "@date-fns/utc";
|
||||
import { SITE_TZ } from "../../lib/config/constants";
|
||||
import type { ComponentPropsWithoutRef } from "react";
|
||||
|
||||
export type TimeProps = ComponentPropsWithoutRef<"time"> & {
|
||||
@@ -14,10 +14,10 @@ const Time = ({ date, format: formatStr = "PPpp", ...rest }: TimeProps) => {
|
||||
return (
|
||||
<time
|
||||
dateTime={formatISO(date, { in: utc })}
|
||||
title={format(date, "MMM d, y, h:mm a O", { in: tz(SITE_TZ), locale: enUS })}
|
||||
title={format(date, "MMM d, y, h:mm a O", { in: tz(env.NEXT_PUBLIC_SITE_TZ), locale: enUS })}
|
||||
{...rest}
|
||||
>
|
||||
{format(date, formatStr, { in: tz(SITE_TZ), locale: enUS })}
|
||||
{format(date, formatStr, { in: tz(env.NEXT_PUBLIC_SITE_TZ), locale: enUS })}
|
||||
</time>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user