Skip to content

Commit

Permalink
Merge pull request #88 from brown-ccv/eldu-patch-1
Browse files Browse the repository at this point in the history
fix: remove limit
  • Loading branch information
eldu authored Jul 11, 2024
2 parents d4a672c + 750450d commit ca9c2b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions src/utils/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
collection,
onSnapshot,
query,
limit,
orderBy,
} from 'firebase/firestore';
import {
Expand Down Expand Up @@ -129,11 +128,7 @@ export const usePublicationsCollection = () => {

useEffect(() => {
const unsubscribe = onSnapshot(
query(
collection(db, publicationsCollection),
orderBy('updatedAt', 'desc'),
limit(100) // TODO: TEMPORARY. Limiting right now. Set up pagination?
),
query(collection(db, publicationsCollection), orderBy('updatedAt', 'desc')),
(snapshot) => {
const publications = snapshot.docs.map((doc) => doc.data());
dispatch(setPublications(publications));
Expand Down

0 comments on commit ca9c2b0

Please sign in to comment.