fix: only show recent 50 synced history entries - fixed #1530
This commit is contained in:
@@ -14,6 +14,9 @@ const firebaseConfig = {
|
|||||||
measurementId: process.env.MEASUREMENT_ID || "G-ERJ6025CEB",
|
measurementId: process.env.MEASUREMENT_ID || "G-ERJ6025CEB",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const historyLimit = 50
|
||||||
|
const graphqlHistoryLimit = 50
|
||||||
|
|
||||||
export const authProviders = {
|
export const authProviders = {
|
||||||
google: () => new firebase.auth.GoogleAuthProvider(),
|
google: () => new firebase.auth.GoogleAuthProvider(),
|
||||||
github: () => new firebase.auth.GithubAuthProvider(),
|
github: () => new firebase.auth.GithubAuthProvider(),
|
||||||
@@ -89,6 +92,7 @@ export class FirebaseInstance {
|
|||||||
.doc(this.currentUser.uid)
|
.doc(this.currentUser.uid)
|
||||||
.collection("history")
|
.collection("history")
|
||||||
.orderBy("updatedOn", "desc")
|
.orderBy("updatedOn", "desc")
|
||||||
|
.limit(historyLimit)
|
||||||
.onSnapshot((historyRef) => {
|
.onSnapshot((historyRef) => {
|
||||||
const history = []
|
const history = []
|
||||||
historyRef.forEach((doc) => {
|
historyRef.forEach((doc) => {
|
||||||
@@ -103,6 +107,7 @@ export class FirebaseInstance {
|
|||||||
.doc(this.currentUser.uid)
|
.doc(this.currentUser.uid)
|
||||||
.collection("graphqlHistory")
|
.collection("graphqlHistory")
|
||||||
.orderBy("updatedOn", "desc")
|
.orderBy("updatedOn", "desc")
|
||||||
|
.limit(graphqlHistoryLimit)
|
||||||
.onSnapshot((historyRef) => {
|
.onSnapshot((historyRef) => {
|
||||||
const history = []
|
const history = []
|
||||||
historyRef.forEach((doc) => {
|
historyRef.forEach((doc) => {
|
||||||
|
|||||||
20857
package-lock.json
generated
20857
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user