Skip to content

Commit

Permalink
moved slicing to backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellie Li authored and Ellie Li committed Nov 12, 2023
1 parent d3533ae commit d995bd3
Show file tree
Hide file tree
Showing 3 changed files with 211 additions and 488 deletions.
2 changes: 1 addition & 1 deletion components/Home/PastActivity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const PastActivity = ({ userData }: any) => {
fetch('/api/events/past')
.then(response => response.json())
.then(data => {
setEvents(data.slice(0, 5)); // Set the activities in state
setEvents(data); // Set the activities in state
})
.catch(error => {
console.error('Error fetching past activities:', error);
Expand Down
Loading

0 comments on commit d995bd3

Please sign in to comment.