Add site context?

This commit is contained in:
Owen Schwartz 2024-10-13 22:58:47 -04:00
parent b53d093065
commit ab41695988
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
3 changed files with 26 additions and 12 deletions

View file

@ -18,6 +18,7 @@ import {
FormMessage,
} from "@/components/ui/form"
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"
import { useSiteContext } from "@app/hooks/useSiteContext"
const appearanceFormSchema = z.object({
theme: z.enum(["light", "dark"], {
@ -37,6 +38,10 @@ const defaultValues: Partial<AppearanceFormValues> = {
}
export function AppearanceForm() {
const site = useSiteContext();
console.log(site);
const form = useForm<AppearanceFormValues>({
resolver: zodResolver(appearanceFormSchema),
defaultValues,