diff --git a/src/components/help/ContactForm.tsx b/src/components/help/ContactForm.tsx index b80ef65..903c46e 100644 --- a/src/components/help/ContactForm.tsx +++ b/src/components/help/ContactForm.tsx @@ -4,7 +4,6 @@ import { ArrowLeft } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { useToast } from '@/hooks/use-toast'; import { supabase } from '@/integrations/supabase/client'; -import { enviarFaleConoscoParaWebhook } from '@/services/webhookService'; import ContactFormFields from './ContactFormFields'; import ContactFormHeader from './ContactFormHeader'; @@ -92,8 +91,21 @@ const ContactForm = ({ onBack }: ContactFormProps) => { }; try { - await enviarFaleConoscoParaWebhook(webhookData); - console.log("Dados enviados para webhook N8N com sucesso"); + console.log("Enviando dados para webhook N8N:", webhookData); + + const response = await fetch('https://webhookn8n.innova1001.com.br/webhook/faleconosco', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(webhookData), + }); + + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + + console.log("Dados do Fale Conosco enviados com sucesso para o webhook N8N"); } catch (webhookError) { console.error("Erro ao enviar para webhook N8N:", webhookError); // Não interrompe o fluxo se o webhook falhar diff --git a/src/components/layout/ModernLayout.tsx b/src/components/layout/ModernLayout.tsx index 1b9e70a..e1ec95f 100644 --- a/src/components/layout/ModernLayout.tsx +++ b/src/components/layout/ModernLayout.tsx @@ -75,6 +75,13 @@ export default function ModernLayout({ children }: ModernLayoutProps) { closeTour } = useOnboardingTour(); + // No mobile, o sidebar deve estar fechado por padrão + useEffect(() => { + if (isMobile) { + setOpen(false); + } + }, [isMobile]); + const mainLinks = [ { id: "dashboard", diff --git a/src/components/ui/modern-sidebar.tsx b/src/components/ui/modern-sidebar.tsx index d0d5129..aaa494e 100644 --- a/src/components/ui/modern-sidebar.tsx +++ b/src/components/ui/modern-sidebar.tsx @@ -86,7 +86,6 @@ export const DesktopSidebar = ({ }: React.ComponentProps<"div">) => { const { open, setOpen, animate } = useSidebar(); - // Separate motion-specific props from HTML div props const { onAnimationStart, onAnimationComplete, ...htmlProps } = props as any; return ( @@ -97,7 +96,7 @@ export const DesktopSidebar = ({ className )} animate={{ - width: animate ? (open ? "300px" : "60px") : "300px", + width: animate ? (open ? "300px" : "80px") : "300px", }} onMouseEnter={() => setOpen(true)} onMouseLeave={() => setOpen(false)} @@ -124,6 +123,11 @@ export const MobileSidebar = ({ {...props} >
Finance Home