start deplou

This commit is contained in:
jze9
2026-05-17 19:32:48 +05:00
parent dd7d8a7ccf
commit a64d8469df
4 changed files with 236 additions and 21 deletions

View File

@@ -5,6 +5,7 @@ import { useTheme } from './hooks/useTheme'
import NewsFeed from './pages/NewsFeed'
import NewsDetail from './pages/NewsDetail'
import NotFound from './pages/NotFound'
import Login from './pages/admin/Login'
import Dashboard from './pages/admin/Dashboard'
import ArticlesList from './pages/admin/ArticlesList'
@@ -36,7 +37,7 @@ export default function App() {
<Route path="/admin/media" element={<PrivateRoute><MediaLibrary /></PrivateRoute>} />
<Route path="/admin/vk" element={<PrivateRoute><VkSources /></PrivateRoute>} />
<Route path="*" element={<Navigate to="/" replace />} />
<Route path="*" element={<NotFound />} />
</Routes>
)
}

View File

@@ -0,0 +1,45 @@
import React from 'react'
import { useNavigate } from 'react-router-dom'
export default function NotFound() {
const navigate = useNavigate()
return (
<div style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
minHeight: '100vh',
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
color: 'white',
textAlign: 'center',
padding: '2rem',
}}>
<h1 style={{ fontSize: '5rem', margin: 0, fontWeight: 'bold' }}>404</h1>
<h2 style={{ fontSize: '1.5rem', marginTop: '0.5rem', fontWeight: '600' }}>Страница не найдена</h2>
<p style={{ fontSize: '1rem', margin: '1rem 0', opacity: 0.9 }}>
Кажется, такой страницы не существует
</p>
<button
onClick={() => navigate('/')}
style={{
marginTop: '2rem',
padding: '0.75rem 2rem',
background: 'white',
color: '#667eea',
border: 'none',
borderRadius: '6px',
fontSize: '1rem',
fontWeight: '600',
cursor: 'pointer',
transition: 'all 0.3s',
}}
onMouseEnter={e => e.target.style.transform = 'scale(1.05)'}
onMouseLeave={e => e.target.style.transform = 'scale(1)'}
>
Вернуться на главную
</button>
</div>
)
}