Internet_programming/Lab5/src/App.jsx

32 lines
855 B
React
Raw Permalink Normal View History

2023-12-14 19:06:42 +04:00
import PropTypes from 'prop-types';
import { Container } from 'react-bootstrap';
import { Toaster } from 'react-hot-toast';
2023-12-22 16:05:31 +04:00
import { BrowserRouter } from 'react-router-dom';
2023-12-14 19:06:42 +04:00
import { Outlet } from 'react-router-dom';
import Footer from './components/footer/Footer.jsx';
import Navigation from './components/navigation/Navigation.jsx';
import React, { useEffect } from 'react';
2023-12-15 18:31:52 +04:00
2023-12-22 16:05:31 +04:00
import { UserProvider } from './Context/UserContext';
// Путь к вашему store
2023-12-14 19:06:42 +04:00
const App = ({ routes }) => {
return (
<>
2023-12-22 16:05:31 +04:00
<UserProvider>
2023-12-14 19:06:42 +04:00
<Navigation routes={routes}></Navigation>
<Container className='p-2' as='main' fluid>
<Outlet />
</Container>
<Footer />
<Toaster position='top-center' reverseOrder={true} />
2023-12-22 16:05:31 +04:00
</UserProvider>
2023-12-14 19:06:42 +04:00
</>
);
};
App.propTypes = {
routes: PropTypes.array,
};
2023-12-15 18:31:52 +04:00
export default App;