Skip to content

Commit

Permalink
Console cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
fgatti675 committed Oct 14, 2024
1 parent 2c9fb67 commit 4062904
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const useFirebaseAuthController = <ExtraData>({
return onAuthStateChanged(
auth,
async (user) => {
console.log("User state changed", user);
console.debug("User state changed", user);
await updateUser(user, true);
},
error => setAuthProviderError(error)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export function useFirestoreDelegate({
databaseId?: string,
collection?: EntityCollection | ResolvedEntityCollection
}) => {
console.log("Init text search controller", props.path);
console.debug("Init text search controller", props.path);
if (!searchControllerRef.current) return false;
return searchControllerRef.current.init(props);
}, []),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const localSearchControllerBuilder: FirestoreTextSearchControllerBuilder
}));

indexes[path] = buildIndex(docs, collectionProp);
console.log("Added docs to index", path, docs.length);
console.debug("Added docs to index", path, docs.length);
resolve(true);
},
error: (e) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/firecms_cloud/src/hooks/useDelegatedLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function useDelegatedLogin({
const auth = getAuth(firebaseApp);
signInWithCustomToken(auth, delegatedToken)
.then(async (userCredential) => {
console.log("Delegated user signed in", userCredential);
console.debug("Delegated user signed in", userCredential);
onUserChanged?.(userCredential.user);
setLoginSuccessful(true);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ export function useLicensesForUserController(): LicensesController {
{
next:
async (snapshot) => {
console.log("Subscriptions snapshot", snapshot.docs.length);
const updatedSubscriptions = (await Promise.all(snapshot.docs.map(convertDocToSubscription))).filter(Boolean) as Subscription[];
onSubscriptionsUpdate(updatedSubscriptions);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export function useSubscriptionsForUserController(): SubscriptionsController {
type: SubscriptionType
}
): Promise<() => void> => {
console.log("Subscribing to product", productPrice.id);
console.debug("Subscribing to product", productPrice.id);

const firestore = firestoreRef.current;
if (!firestore) throw new Error("Firestore not initialized");
Expand Down Expand Up @@ -178,8 +178,6 @@ export function useSubscriptionsForUserController(): SubscriptionsController {

// Save checkout session to Firestore
const checkoutSessionRef = collection(firestore, CUSTOMERS_COLLECTION, userId, CHECKOUT_SESSION_COLLECTION);

console.log(checkoutSessionRef);
const docRef = await addDoc(checkoutSessionRef, checkoutSession);

return new Promise((resolve, reject) => {
Expand All @@ -189,7 +187,7 @@ export function useSubscriptionsForUserController(): SubscriptionsController {
url
} = snap.data();

console.log("Checkout session updated", snap.data());
console.debug("Checkout session updated", snap.data());
onCheckoutSessionReady(url, error);

if (url) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export function ReferenceSelectionTable<M extends Record<string, any>>(

const fullPath = navigation.resolveAliasesFrom(pathInput);

console.trace("Opening reference dialog for path " + fullPath);
const dataSource = useDataSource(collection);

const [entitiesDisplayedFirst, setEntitiesDisplayedFirst] = useState<Entity<any>[]>([]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export function ArrayOfReferencesFieldBinding({
}

const onMultipleEntitiesSelected = useCallback((entities: Entity<any>[]) => {
console.debug("onMultipleEntitiesSelected", entities);
setValue(entities.map(e => getReferenceFrom(e)));
}, [setValue]);

Expand Down

0 comments on commit 4062904

Please sign in to comment.