finishes functionality for cart, checkout, return and renter registration

This commit is contained in:
David Lick
2020-05-31 23:25:49 -04:00
parent 28e52a4e08
commit 5cd92132b3
326 changed files with 495 additions and 16570 deletions
+15 -3
View File
@@ -1,8 +1,11 @@
import React from 'react';
import React, { useEffect } from 'react';
import './App.css';
import styled from 'styled-components';
import Sidebar from './containers/Sidebar/Sidebar';
import Content from './containers/Content/Content';
import { useDispatch } from 'react-redux';
import { fetchBooks } from './actions/books';
import { fetchRenters } from './actions/renters';
const AppContainer = styled.div`
background: #13334A;
@@ -10,11 +13,20 @@ const AppContainer = styled.div`
display: flex;
`
const App: React.FC = () => (
const App: React.FC = () => {
const dispatch = useDispatch();
useEffect(() => {
dispatch(fetchBooks());
dispatch(fetchRenters());
}, []);
return (
<AppContainer>
<Sidebar/>
<Content />
</AppContainer>
)
);
};
export default App;