1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 12:06:39 -04:00

simplify theme provider

This commit is contained in:
2025-03-01 16:08:12 -05:00
parent 9c4d14fa45
commit 36faa6c234
11 changed files with 99 additions and 120 deletions

View File

@ -13,7 +13,7 @@ import { SiMarkdown } from "react-icons/si";
import styles from "./form.module.css";
const ContactForm = () => {
const { activeTheme } = useTheme();
const { theme } = useTheme();
const [formState, formAction, pending] = useActionState<
Partial<{ success: boolean; message: string; payload: FormData }>,
FormData
@ -81,7 +81,7 @@ const ContactForm = () => {
<Turnstile
sitekey={process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY || "1x00000000000000000000AA"}
style={{ margin: "1em 0" }}
theme={activeTheme === "dark" ? activeTheme : "light"}
theme={theme === "dark" ? theme : "light"}
fixedSize
/>

View File

@ -28,7 +28,7 @@ export async function generateStaticParams() {
const slugs = await getPostSlugs();
// map slugs into a static paths object required by next.js
return slugs.map((slug: string) => ({
return slugs.map((slug) => ({
slug,
}));
}

View File

@ -283,7 +283,7 @@ export default function Page() {
>
Bluesky
</ColorfulLink>
,{" "}
, or{" "}
<ColorfulLink
href="https://fediverse.jarv.is/@jake"
rel="me"
@ -292,15 +292,6 @@ export default function Page() {
darkColor="#7b87ff"
>
Mastodon
</ColorfulLink>
, or{" "}
<ColorfulLink
href="sms:+1-617-917-3737"
title="Send SMS to +1 (617) 917-3737"
lightColor="#6fcc01"
darkColor="#8edb34"
>
SMS
</ColorfulLink>{" "}
as well!
</p>