first
This commit is contained in:
29
src/App.jsx
Normal file
29
src/App.jsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import React from 'react';
|
||||
import { BrowserRouter as Router, Routes, Route, useLocation } from 'react-router-dom';
|
||||
import Home from './pages/Home';
|
||||
import Portal from './pages/Portal';
|
||||
import { AnimatePresence } from 'framer-motion';
|
||||
|
||||
// Animasyonlu geçişler için bir Wrapper bileşeni
|
||||
function AnimatedRoutes() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<AnimatePresence mode="wait">
|
||||
<Routes location={location} key={location.pathname}>
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="/portal" element={<Portal />} />
|
||||
</Routes>
|
||||
</AnimatePresence>
|
||||
);
|
||||
}
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<Router>
|
||||
<AnimatedRoutes />
|
||||
</Router>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
Reference in New Issue
Block a user