fix music url structure
This commit is contained in:
@@ -55,9 +55,6 @@ export default function useDataFromRef({
|
||||
if (!_.isEqual(data, initialState)) {
|
||||
onUpdate(initialState);
|
||||
}
|
||||
|
||||
console.log("Reset state", initialState);
|
||||
|
||||
setEndReached(false);
|
||||
setLastVisible(null);
|
||||
setData(initialState);
|
||||
@@ -77,10 +74,10 @@ export default function useDataFromRef({
|
||||
paginate && lastVisible
|
||||
? ref.startAfter(lastVisible).limit(batchSize)
|
||||
: initialDoc
|
||||
? ref.startAt(initialDoc).limit(batchSize)
|
||||
: paginate
|
||||
? ref.limit(batchSize)
|
||||
: ref;
|
||||
? ref.startAt(initialDoc).limit(batchSize)
|
||||
: paginate
|
||||
? ref.limit(batchSize)
|
||||
: ref;
|
||||
|
||||
const dataSnap = await dynamicRef.get();
|
||||
|
||||
@@ -113,7 +110,7 @@ export default function useDataFromRef({
|
||||
if (e.code === "firestore/permission-denied") {
|
||||
console.warn(
|
||||
"Permission denied for ref: ",
|
||||
ref?._collectionPath?.relativeName
|
||||
ref?._collectionPath?.relativeName,
|
||||
);
|
||||
} else {
|
||||
console.log(e);
|
||||
@@ -143,14 +140,14 @@ export default function useDataFromRef({
|
||||
if (e.code === "firestore/permission-denied") {
|
||||
console.warn(
|
||||
"Permission denied for ref: ",
|
||||
ref?._collectionPath?.relativeName
|
||||
ref?._collectionPath?.relativeName,
|
||||
);
|
||||
} else {
|
||||
console.log(e);
|
||||
}
|
||||
await updateData([]);
|
||||
setLoading(false);
|
||||
}
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user