refactor(logging): centralize console output
This commit is contained in:
@@ -18,6 +18,9 @@ import { ROUTES } from "@/router/routes";
|
||||
|
||||
import { SubscriptionCtaButton } from "./subscription-cta-button";
|
||||
import styles from "./subscription-cta-button.module.css";
|
||||
import { Logger } from "@/utils";
|
||||
|
||||
const log = new Logger("AppSubscriptionComponentsSubscriptionCheckoutButton");
|
||||
|
||||
export interface SubscriptionCheckoutButtonProps {
|
||||
planId: SubscriptionPlanId;
|
||||
@@ -64,7 +67,7 @@ export function SubscriptionCheckoutButton({
|
||||
window.location.href = url;
|
||||
} catch (e) {
|
||||
const err = e as Error;
|
||||
console.error("[subscription-checkout-button] error", err);
|
||||
log.error("[subscription-checkout-button] error", err);
|
||||
setError(err.message);
|
||||
setIsLoading(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user