import React, { useState, useEffect } from 'react'; import { useLocation } from "react-router-dom"; import styled from 'styled-components' import ContactForm from '../sections/contact/Forms'; import CompanyInfo from '../sections/contact/Info'; import { createGlobalStyle } from 'styled-components'; const GlobalStyle = createGlobalStyle` /* Ensure text inside the phone input is visible */ .iti__tel-input { width: 100% !important; color: black !important; /* Sets the text color to black */ background-color: white !important; /* Sets the background color to white */ border: 1px solid #ccc !important; /* Optional: Sets a border color for better visibility */ padding: 0.75rem 1rem; font-size: 1rem; border: 3px solid #00AA00 !important; /* Transparent border initially */ border-radius: 0.375rem; color: black; &:focus { outline: none; box-shadow: 0 0 8px rgba(14, 168, 182, 0.5); /* Subtle glow effect */ } } .iti__country-list, .iti__a11y-text, .iti__search-input{ color:black; } ` // Styled Components const Main = styled.main` min-height: 100vh; /* Ensure it covers full viewport height */ background-color: black; color: white; padding: 2rem 1rem; box-sizing: border-box;} ` const Container = styled.div` max-width: 100vw; margin: 0 auto; padding: 2rem 1rem; background-color: transparent; color: white; width: 100%; /* Ensure full width */ box-sizing: border-box; ` const Title = styled.h1` font-size: 2.5rem; font-weight: bold; text-align: center; margin-bottom: 2rem; ` const Grid = styled.div` display: grid; grid-template-columns: 1fr; /* Default to single column for smaller screens */ gap: 2rem; margin-top: 2rem; @media (min-width: 768px) { grid-template-columns: 50% 50%; } ` const ButtonGroupContainer = styled.div` display: flex; justify-content: center; ` const ButtonWrapper = styled.div` position: relative; display: inline-flex; border-radius: 9999px; background-color: #e5e7eb; overflow: hidden; ` const Button = styled.button` padding: 0.5rem 1.5rem; border-radius: ${(props) => props.$position === 'left' ? '9999px 0 0 9999px' : '0 9999px 9999px 0'}; color: ${(props) => (props.$active ? 'white' : '#4b5563')}; position: relative; z-index: 10; `; const GradientBackground = styled.div` position: absolute; top: 0; bottom: 0; width: 50%; background: #00AA00; border-radius: 9999px; transition: all 0.3s ease-in-out; left: ${props => props.position === 'left' ? '0' : '50%'}; ` // ButtonGroup Component const ButtonGroup = ({ formType, setFormType }) => { const [gradientPosition, setGradientPosition] = useState('left') useEffect(() => { setGradientPosition(formType === 'general' ? 'left' : 'right') }, [formType]) return ( ) } // ContactPage Component const ContactPage = () => { const [formType, setFormType] = useState("general"); const [product, setProduct] = useState("VarDiG AI"); const location = useLocation(); useEffect(() => { if (location.state) { const { formType: passedFormType, product:product } = location.state; if (passedFormType) setFormType(passedFormType); // Update form type if (product && passedFormType === "demo") { setFormType("demo"); // Ensure it's set to demo } if (product==="VarDiG SaaS"){ setProduct("VarDiG SaaS"); } } }, [location.state]); return (
Get in Touch
); }; export default ContactPage;