Skip to content

Commit c1bce51

Browse files
committed
fixed
1 parent d77340e commit c1bce51

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

src/components/ContactFormModal/styles.module.css

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,10 @@
1717
width: 30%;
1818
padding: 30px;
1919
border-radius: 10px;
20+
position: relative;
2021
}
2122

2223
.close {
23-
color: #aaa;
24-
float: right;
25-
font-size: 28px;
26-
font-weight: bold;
27-
}
28-
29-
.close:hover,
30-
.close:focus {
31-
color: black;
32-
text-decoration: none;
3324
cursor: pointer;
3425
}
3526

@@ -63,6 +54,8 @@
6354

6455
.error{
6556
color: red;
57+
font-size: 12px;
58+
margin-top: 4px;
6659
}
6760

6861
form {
@@ -120,6 +113,12 @@ form div button:hover {
120113
color: red;
121114
}
122115

116+
.success{
117+
text-align: center;
118+
padding-top: 20px;
119+
padding-bottom: 20px;
120+
}
121+
123122
@media only screen and (max-width: 768px) {
124123
.modalContent {
125124
width: 90%;

src/pages/groot.js

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import clsx from "clsx";
1111
import EditorVideo from "@site/static/img/groot2_editor.mp4";
1212
import MonitorVideo from "@site/static/img/groot2_monitor.mp4";
1313
import LogVideo from "@site/static/img/groot2_log.mp4";
14-
import ContactFormModal from "../components/ContactFormModal";
14+
import ContactUSFormModal from "../components/ContactFormModal";
1515

1616
function Check(props) {
1717
return <img src={useBaseUrl("img/check.png")} width='15' alt='yes' />;
@@ -23,7 +23,7 @@ function Cross(props) {
2323
export default function Groot() {
2424

2525
const [chargebeeInitialized, setChargebeeInitialized] = useState(false);
26-
const [open, setOpen] = useState(false);
26+
const [openContactUsModal, setOpenContactUsModal] = useState(false);
2727

2828
useEffect(() => {
2929
if (!chargebeeInitialized) {
@@ -55,11 +55,17 @@ export default function Groot() {
5555
console.log('free')
5656
scrollToSection('sectionDownload')
5757
}
58+
5859
const handleClickPro = () => {
5960
console.log('Pro')
60-
setOpen(true)
61-
// window.location.href = 'mailto:[email protected]'
6261
};
62+
63+
const handleClickContact = () => {
64+
console.log('contact')
65+
setOpenContactUsModal(true)
66+
// window.location.href = 'mailto:[email protected]'
67+
}
68+
6369
const obj = [
6470
{
6571
name: "Basic",
@@ -95,7 +101,7 @@ export default function Groot() {
95101
"Site license with unlimited number of seats.",
96102
],
97103
btn: "Contact us",
98-
onclick:() => handleClickPro()
104+
onclick:() => handleClickContact()
99105
},
100106
];
101107
console.log(obj);
@@ -150,23 +156,15 @@ export default function Groot() {
150156
}
151157
};
152158

153-
154-
useEffect(() => {
155-
if(open){
156-
document.body.style.overflow = "hidden"
157-
}else{
158-
document.body.style.overflow = "auto"
159-
}
160-
},[open])
161-
159+
const handleCloseUsModal = () => setOpenContactUsModal(false)
162160

163161
return (
164162
<>
165163
<Layout title='Groot' description='Groot Editor'>
166164
{/* groot intro */}
167-
{
168-
open && <ContactFormModal handleClose={()=>setOpen(false)}/>
169-
}
165+
{openContactUsModal && (
166+
<ContactUSFormModal handleClose={handleCloseUsModal}/>
167+
)}
170168
<div className={clsx("hero hero--dark", styles.heroBanner)}>
171169
<div className='container '>
172170
<div className='row align-items-center'>
@@ -183,6 +181,11 @@ export default function Groot() {
183181
className='button button--primary button--lg'>
184182
Download
185183
</button>
184+
<button
185+
onClick={() => handleClickContact()}
186+
className='button button--primary button--lg'>
187+
Contact us
188+
</button>
186189
</div>
187190
</div>
188191
<div className='col col--6'>

0 commit comments

Comments
 (0)