Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | 1x 13x 13x 13x 4x 13x 1x 1x 1x 1x 13x 13x 13x 13x 52x 65x | import React, { useState } from "react";
import "./ContactPage.scss";
import { Container, Typography, Grid, TextField, Button, Paper, MenuItem, Snackbar, Alert, Box } from "@mui/material";
import EmailOutlinedIcon from "@mui/icons-material/EmailOutlined";
import PhoneOutlinedIcon from "@mui/icons-material/PhoneOutlined";
import LocationOnOutlinedIcon from "@mui/icons-material/LocationOnOutlined";
import AccessTimeOutlinedIcon from "@mui/icons-material/AccessTimeOutlined";
import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
const ContactPage = () => {
const [formData, setFormData] = useState({
name: "",
email: "",
subject: "",
role: "",
message: "",
});
const [snackbar, setSnackbar] = useState({
open: false,
message: "",
severity: "success",
});
const handleChange = (e) => {
setFormData({
...formData,
[e.target.name]: e.target.value,
});
};
const handleSubmit = (e) => {
e.preventDefault();
console.log("Form submitted:", formData);
setSnackbar({
open: true,
message: "Thank you for contacting us! We'll get back to you soon.",
severity: "success",
});
setFormData({
name: "",
email: "",
subject: "",
role: "",
message: "",
});
};
const handleCloseSnackbar = () => {
setSnackbar({ ...snackbar, open: false });
};
const contactInfo = [
{
icon: <EmailOutlinedIcon />,
title: "Email Us",
content: "info@eruditiontx.com",
subContent: "support@eruditiontx.com",
},
{
icon: <PhoneOutlinedIcon />,
title: "Call Us",
content: "+1 (555) 123-4567",
subContent: "Mon-Fri, 8AM-6PM CST",
},
{
icon: <LocationOnOutlinedIcon />,
title: "Visit Us",
content: "Houston, Texas",
subContent: "United States",
},
{
icon: <AccessTimeOutlinedIcon />,
title: "Office Hours",
content: "Monday - Friday",
subContent: "8:00 AM - 6:00 PM CST",
},
];
const roles = ["Educator", "Student", "Administrator", "Parent", "Other"];
return (
<React.Fragment>
{/* Hero Section */}
<section className="contact-hero">
<div className="hero-background">
<div className="gradient-overlay" />
</div>
<Container maxWidth="lg">
<div className="hero-content">
<span className="section-label">Contact</span>
<Typography variant="h1" className="hero-title">
Get in <span className="highlight">Touch</span>
</Typography>
<Typography variant="body1" className="hero-subtitle">
Have questions? We'd love to hear from you. Send us a message and we'll respond as soon as
possible.
</Typography>
</div>
</Container>
</section>
{/* Contact Info Cards */}
<section className="contact-info-section">
<Container maxWidth="lg">
<Grid container spacing={2}>
{contactInfo.map((info, index) => (
<Grid size={{ xs: 12, sm: 6, md: 3 }} key={index}>
<Paper className="info-card" elevation={0}>
<div className="info-icon">{info.icon}</div>
<Typography variant="h6" className="info-title">
{info.title}
</Typography>
<Typography variant="body1" className="info-content">
{info.content}
</Typography>
<Typography variant="body2" className="info-subcontent">
{info.subContent}
</Typography>
</Paper>
</Grid>
))}
</Grid>
</Container>
</section>
{/* Contact Form Section */}
<section className="contact-form-section">
<Container maxWidth="lg">
<Grid container spacing={6}>
<Grid size={{ xs: 12, md: 5 }}>
<div className="form-info">
<span className="section-label">Reach Out</span>
<Typography variant="h2" className="section-title">
Send Us a Message
</Typography>
<Typography variant="body1" className="section-description">
Whether you're an educator looking to transform your classroom, a student seeking
support, or an administrator exploring our platform, we're here to help.
</Typography>
<Box className="benefits-box">
<Typography variant="h6" className="benefits-title">
What to expect:
</Typography>
<ul className="benefits-list">
<li>Quick response within 24 hours</li>
<li>Personalized solutions for your needs</li>
<li>Expert guidance from our team</li>
<li>Free demo and consultation</li>
</ul>
</Box>
<div className="cta-box">
<Typography variant="h6" className="cta-title">
Need immediate assistance?
</Typography>
<Typography variant="body2" className="cta-description">
Call us directly at
</Typography>
<Typography variant="h5" className="cta-phone">
+1 (555) 123-4567
</Typography>
</div>
</div>
</Grid>
<Grid size={{ xs: 12, md: 7 }}>
<Paper className="contact-form-paper" elevation={0}>
<form onSubmit={handleSubmit}>
<Grid container spacing={2.5}>
<Grid size={{ xs: 12, sm: 6 }}>
<TextField
fullWidth
label="Full Name"
name="name"
value={formData.name}
onChange={handleChange}
required
variant="outlined"
size="medium"
/>
</Grid>
<Grid size={{ xs: 12, sm: 6 }}>
<TextField
fullWidth
label="Email Address"
name="email"
type="email"
value={formData.email}
onChange={handleChange}
required
variant="outlined"
size="medium"
/>
</Grid>
<Grid size={{ xs: 12, sm: 6 }}>
<TextField
fullWidth
select
label="I am a..."
name="role"
value={formData.role}
onChange={handleChange}
required
variant="outlined"
size="medium"
>
{roles.map((role) => (
<MenuItem key={role} value={role}>
{role}
</MenuItem>
))}
</TextField>
</Grid>
<Grid size={{ xs: 12, sm: 6 }}>
<TextField
fullWidth
label="Subject"
name="subject"
value={formData.subject}
onChange={handleChange}
required
variant="outlined"
size="medium"
/>
</Grid>
<Grid size={{ xs: 12 }}>
<TextField
fullWidth
label="Message"
name="message"
value={formData.message}
onChange={handleChange}
required
multiline
rows={5}
variant="outlined"
placeholder="Tell us more about how we can help you..."
/>
</Grid>
<Grid size={{ xs: 12 }}>
<Button
type="submit"
variant="contained"
size="large"
fullWidth
endIcon={<ArrowForwardIcon />}
className="submit-button"
>
Send Message
</Button>
</Grid>
</Grid>
</form>
</Paper>
</Grid>
</Grid>
</Container>
</section>
{/* Map Section */}
<section className="map-section">
<Container maxWidth="lg">
<Paper className="map-placeholder" elevation={0}>
<div className="map-overlay">
<LocationOnOutlinedIcon className="map-icon" />
<Typography variant="h5" className="map-text">
Houston, Texas
</Typography>
<Typography variant="body1" className="map-subtext">
Serving schools across Texas and beyond
</Typography>
</div>
</Paper>
</Container>
</section>
<Snackbar
open={snackbar.open}
autoHideDuration={6000}
onClose={handleCloseSnackbar}
anchorOrigin={{ vertical: "bottom", horizontal: "center" }}
>
<Alert onClose={handleCloseSnackbar} severity={snackbar.severity} sx={{ width: "100%" }}>
{snackbar.message}
</Alert>
</Snackbar>
</React.Fragment>
);
};
export default ContactPage;
|