Files
autobro-front/src/pages/MainPage.tsx
2025-07-07 21:01:46 +05:00

47 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React, { useState } from 'react'
import { Button, Container, Box, Typography } from '@mui/material'
import Feedback from '../components/Feedback'
function MainPage() {
const [feedbackOpen, setFeedbackOpen] = useState(false);
const handleOpenFeedback = () => {
setFeedbackOpen(true);
};
const handleCloseFeedback = () => {
setFeedbackOpen(false);
};
return (
<Container maxWidth="xl">
<Box sx={{ mt: 4, textAlign: 'center' }}>
<Typography variant="h3" component="h1" gutterBottom>
Главная страница
</Typography>
<Typography variant="body1" paragraph>
Это главная страница приложения
</Typography>
<Button
variant="contained"
onClick={handleOpenFeedback}
sx={{
bgcolor: '#c22d1a',
color: 'white',
py: 1.5,
px: 3,
'&:hover': { bgcolor: '#a42517' }
}}
>
Оставить заявку
</Button>
</Box>
<Feedback open={feedbackOpen} onClose={handleCloseFeedback} />
</Container>
)
}
export default MainPage