feat: show stream name in breadcrumbs
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
doc,
|
||||
onSnapshot,
|
||||
addDoc,
|
||||
getDoc,
|
||||
updateDoc,
|
||||
query,
|
||||
orderBy,
|
||||
@@ -72,6 +73,15 @@ export function subscribeToParticle(
|
||||
);
|
||||
}
|
||||
|
||||
export async function getParticle(docPath: string): Promise<Particle | null> {
|
||||
const doc = await getDoc(typedDoc(docPath));
|
||||
if (!doc.exists()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return doc.data();
|
||||
}
|
||||
|
||||
export function subscribeToParticleChildren(
|
||||
collectionPath: string,
|
||||
onData: (children: Particle[]) => void,
|
||||
|
||||
Reference in New Issue
Block a user