404 notfound sayfası

This commit is contained in:
Sedat ÖZTÜRK 2025-05-28 08:55:11 +03:00
parent 0d0fffc794
commit 2858089c52
2 changed files with 21 additions and 0 deletions

View file

@ -8,6 +8,7 @@ import About from './pages/About';
import Blog from './pages/Blog'; import Blog from './pages/Blog';
import Contact from './pages/Contact'; import Contact from './pages/Contact';
import BlogDetail from './pages/BlogDetail'; import BlogDetail from './pages/BlogDetail';
import NotFound from './pages/NotFound'; // 404 bileşenini import et
import { LanguageProvider } from './context/LanguageContext'; import { LanguageProvider } from './context/LanguageContext';
function App() { function App() {
@ -23,6 +24,7 @@ function App() {
<Route path="/blog" element={<Blog />} /> <Route path="/blog" element={<Blog />} />
<Route path="/contact" element={<Contact />} /> <Route path="/contact" element={<Contact />} />
<Route path="/blog/:id" element={<BlogDetail />} /> <Route path="/blog/:id" element={<BlogDetail />} />
<Route path="*" element={<NotFound />} /> {/* Eşleşmeyen tüm yollar için 404 sayfasını göster */}
</Routes> </Routes>
</Layout> </Layout>
</Router> </Router>

View file

@ -0,0 +1,19 @@
import React from 'react';
import { Frown } from 'lucide-react'; // Lucide-react kütüphanesinden Frown ikonunu import et
const NotFound: React.FC = () => {
return (
<div className="flex flex-col items-center justify-center min-h-screen bg-white text-gray-700 p-4"> {/* Arka plan ve metin rengi güncellendi, padding eklendi */}
<Frown size={128} className="text-blue-600 mb-6" /> {/* İkon boyutu ve rengi güncellendi */}
<h1 className="text-7xl font-bold text-gray-900 mb-4">404</h1> {/* Başlık boyutu ve rengi güncellendi */}
<p className="text-xl text-gray-600 mb-8 text-center max-w-md"> {/* Metin rengi, margin ve max-width güncellendi */}
Üzgünüz, aradığınız sayfa bulunamadı. Lütfen URL'yi kontrol edin veya ana sayfaya dönün.
</p>
<a href="/" className="px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition duration-300 text-lg font-semibold"> {/* Buton stili güncellendi */}
Ana Sayfaya Dön
</a>
</div>
);
};
export default NotFound;