diff --git a/README.md b/README.md index 97edac9..876927b 100644 --- a/README.md +++ b/README.md @@ -11,17 +11,17 @@ **Поддержать проект** - Банковским переводом: - - Карта МИР: `2204320436318077` - - Карта MasterCard: `5395452209474530` + - :credit_card: Карта МИР: `2204320436318077` + - :credit_card: Карта MasterCard: `5395452209474530` - На электронный кошелек: - - ЮМоney: `4100116897060652` - - PayPal: `vasiljevdenisx@gmail.com` + - :moneybag: ЮМоney: `4100116897060652` + - :moneybag: PayPal: `vasiljevdenisx@gmail.com` - Криптовалютой: - - USDT | ETH (ERC20 | BEP20): `0x6fe140040f6Cdc1E1Ff2136cd1d60C0165809463` - - USDT | TRX (TRC20): `TEWxXmJxvkAmhshp7E61XJGHB3VyM9hNAb` - - Bitcoin: `bc1qctntwncsv2yn02x2vgnkrqm00c4h04c0afkgpl` - - TON: `UQCZ3MiwyYHXftPItMMzJRYRiKHugr16jFMq2nfOQOOoemLy` - - Bybit ID: `165292278` + - :coin: USDT | ETH (ERC20 | BEP20): `0x6fe140040f6Cdc1E1Ff2136cd1d60C0165809463` + - :coin: USDT | TRX (TRC20): `TEWxXmJxvkAmhshp7E61XJGHB3VyM9hNAb` + - :coin: Bitcoin: `bc1qctntwncsv2yn02x2vgnkrqm00c4h04c0afkgpl` + - :coin: TON: `UQCZ3MiwyYHXftPItMMzJRYRiKHugr16jFMq2nfOQOOoemLy` + - :coin: Bybit ID: `165292278` ## Описание diff --git a/client/src/api.ts b/client/src/api.ts index fc8e45c..8f7592a 100644 --- a/client/src/api.ts +++ b/client/src/api.ts @@ -1,7 +1,7 @@ import axios from 'axios'; const api = axios.create({ - baseURL: `${location.protocol}//${location.hostname}:${location.port}/api`, + baseURL: `${location.protocol}//${location.hostname}:3000/api`, }); export default api; \ No newline at end of file diff --git a/client/src/components/Footer.tsx b/client/src/components/Footer.tsx index 0b2fc2f..9d6c805 100644 --- a/client/src/components/Footer.tsx +++ b/client/src/components/Footer.tsx @@ -1,7 +1,11 @@ import { Box, Container, Grid, IconButton, Link, Stack } from '@mui/material'; import { GitHub, YouTube, Telegram } from '@mui/icons-material'; -export default function Footer() { +interface FooterProps { + isMobile?: boolean; +} + +export default function Footer({ isMobile }: FooterProps) { return ( - - Logo + + Logo - + - + void; + isMobile?: boolean; +} + +export default function Header({ onMenuClick, isMobile }: HeaderProps) { const { mode, toggleColorMode } = useThemeContext(); const { logout } = useAuth(); const navigate = useNavigate(); @@ -48,12 +54,17 @@ export default function Header() { sx={{ zIndex: (theme) => theme.zIndex.drawer + 1 }} > + {isMobile && ( + + + + )} Logo - + 3DP-MANAGER - + setHelpOpen(true)}> diff --git a/client/src/components/Layout.tsx b/client/src/components/Layout.tsx index c60aa77..8ce644a 100644 --- a/client/src/components/Layout.tsx +++ b/client/src/components/Layout.tsx @@ -1,9 +1,10 @@ import { Toolbar, Drawer, List, ListItem, - ListItemButton, ListItemIcon, ListItemText, Box + ListItemButton, ListItemIcon, ListItemText, Box, useMediaQuery, useTheme } from '@mui/material'; import { People, Settings, Dns, SwapHoriz } from '@mui/icons-material'; import { useNavigate, useLocation, Outlet } from 'react-router-dom'; +import { useState } from 'react'; import Header from './Header'; import Footer from './Footer'; @@ -13,6 +14,13 @@ const drawerWidth = 240; export default function Layout() { const navigate = useNavigate(); const location = useLocation(); + const theme = useTheme(); + const isMobile = useMediaQuery(theme.breakpoints.down('md')); + const [mobileOpen, setMobileOpen] = useState(false); + + const handleDrawerToggle = () => { + setMobileOpen(!mobileOpen); + }; const menuItems = [ { text: 'Подписки', icon: , path: '/' }, @@ -21,35 +29,44 @@ export default function Layout() { { text: 'Настройки', icon: , path: '/settings' }, ]; + const drawerContent = ( + + + + {menuItems.map((item) => ( + + { + navigate(item.path); + if (isMobile) setMobileOpen(false); + }} + > + {item.icon} + + + + ))} + + + ); + return ( - -
+ {/* Передаем функцию открытия в Header */} +
- - - - {menuItems.map((item) => ( - - navigate(item.path)} - > - {item.icon} - - - - ))} - - + {drawerContent} - - + - -