1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-18 15:05:32 -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
/>