text: import { useEffect } from 'react';
  import { BrowserRouter } from 'react-router-dom';
  import { useDispatch } from 'react-redux';
  import { loadUserAction } from '../actions/userActions';
  import Navbar from './layouts/Navbar';
  import Routes from './routing/Routes';
  
  const App = () => {
    const dispatch = useDispatch();
  
    useEffect(() => {
      dispatch(loadUserAction());
      // eslint-disable-next-line
    }, []);
  
    return (
      <BrowserRouter>
        <header>
          <Navbar />
        </header>
        <main>
          <Routes />
        </main>
      </BrowserRouter>
    );
  };
  
  export default App;
  