This commit is contained in:
Emmanuel Rojas committed 2026-10-06 02:00:11 -05:00
1 parent 794a659369
commit 5f99b65611
349 files changed
+32252 -2180

No files matched your search

@@ -0,0 +1,23 @@
'use client';
import { createContext, useContext, useState } from 'react';
import { ContactModal } from '@/app/(landing)/components/ContactModal';
import { useIsDark } from '@/app/(landing)/hooks/useIsDark';
interface ContactCtx {
open: () => void;
}
const ContactContext = createContext<ContactCtx>({ open: () => {} });
export const ContactProvider = ({ children }: { children: React.ReactNode }) => {
const [isOpen, setIsOpen] = useState(false);
const isDark = useIsDark();
return (
<ContactContext.Provider value={{ open: () => setIsOpen(true) }}>
{children}
<ContactModal isOpen={isOpen} onClose={() => setIsOpen(false)} isNavyBg={isDark} />
</ContactContext.Provider>
);
};
export const useContact = () => useContext(ContactContext);