building out feed page system

This commit is contained in:
2022-01-30 12:54:51 -06:00
parent e5f30771d0
commit a77adade9f
2 changed files with 4 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ Additional features implemented include:
## Changelog: ## Changelog:
### Version 0.1, 01/30/2022 ### Version 0, 01/30/2022
First project build! First project build!

View File

@@ -10,6 +10,9 @@ export default function Feed() {
const [endpoints, setEndpoints] = useState(null); // Expects to receive an array of endpoints from which to fetch the posts const [endpoints, setEndpoints] = useState(null); // Expects to receive an array of endpoints from which to fetch the posts
const [data, setData] = useState(null); // Receives data from getPosts and them maps it onto Post components const [data, setData] = useState(null); // Receives data from getPosts and them maps it onto Post components
const [feed, setFeed] = useState(null); // Expects to receive an array of Post components mapped with data from fetchBySub const [feed, setFeed] = useState(null); // Expects to receive an array of Post components mapped with data from fetchBySub
const [feedPage, setFeedPage] = useState(['']); // Expects an array of arrays (pages of feed posts)
const [currentPage, setCurrentPage] = useState(0);
const dispatch = useDispatch(); const dispatch = useDispatch();
// const posts = useSelector(selectPosts); // const posts = useSelector(selectPosts);