refactor: extract properties for container particles to flat fields in firestore
This commit is contained in:
@@ -20,3 +20,20 @@ export function useCreateParticle() {
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
type CreateStreamParticleParams = Omit<CreateParticleParams<"stream">, "type"> & {
|
||||
visibleTo?: string[];
|
||||
};
|
||||
|
||||
export function useCreateStreamParticle() {
|
||||
return useMutation({
|
||||
mutationFn: (params: CreateStreamParticleParams) =>
|
||||
createParticle(
|
||||
params.collectionPath,
|
||||
"stream",
|
||||
params.properties,
|
||||
params.createdByEmail,
|
||||
params.visibleTo,
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user