perf(bundle): replace broad storage and utils imports
This commit is contained in:
@@ -18,7 +18,8 @@ import type {
|
||||
PaymentContextState,
|
||||
} from "@/stores/payment/payment-context";
|
||||
import type { PaymentEvent } from "@/stores/payment/payment-events";
|
||||
import { AppEnvUtil, Logger } from "@/utils";
|
||||
import { AppEnvUtil } from "@/utils/app-env";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
const UNSUPPORTED_PAYMENT_PARAMS_MESSAGE =
|
||||
"Payment parameters did not include a supported URL or Stripe client secret.";
|
||||
|
||||
@@ -13,7 +13,7 @@ import { ROUTES } from "@/router/routes";
|
||||
import { useAppNavigator } from "@/router/use-app-navigator";
|
||||
|
||||
import { AuthBackground, AuthPanel } from "./components";
|
||||
import { Logger } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
const log = new Logger("AppAuthAuthScreen");
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { ReactNode } from "react";
|
||||
import { MdEmail } from "react-icons/md";
|
||||
|
||||
import { BottomSheet } from "@/app/_components/core/bottom-sheet";
|
||||
import { AppEnvUtil } from "@/utils";
|
||||
import { AppEnvUtil } from "@/utils/app-env";
|
||||
|
||||
import { AuthProviderIcon } from "./auth-provider-icon";
|
||||
import { AuthSocialButton } from "./auth-social-button";
|
||||
|
||||
@@ -13,7 +13,8 @@ import {
|
||||
import { AuthTextField } from "./auth-text-field";
|
||||
import { AuthPrimaryButton } from "./auth-primary-button";
|
||||
import { AuthErrorMessage } from "./auth-error-message";
|
||||
import { AppEnvUtil, Logger } from "@/utils";
|
||||
import { AppEnvUtil } from "@/utils/app-env";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
const log = new Logger("AppAuthComponentsEmailLoginForm");
|
||||
const NON_PRODUCTION_DEFAULT_EMAIL = "chanwillian0@gmail.com";
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
import { AuthTextField } from "./auth-text-field";
|
||||
import { AuthPrimaryButton } from "./auth-primary-button";
|
||||
import { AuthErrorMessage } from "./auth-error-message";
|
||||
import { Logger } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
const log = new Logger("AppAuthComponentsEmailRegisterForm");
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
import type { LoginStatus } from "@/data/dto/auth";
|
||||
import type { ChatUpgradeReason } from "@/stores/chat/chat-state";
|
||||
import { AppEnvUtil, BrowserDetector } from "@/utils";
|
||||
import { AppEnvUtil } from "@/utils/app-env";
|
||||
import { BrowserDetector } from "@/utils/browser-detect";
|
||||
|
||||
export interface ExternalBrowserPromptState {
|
||||
hasInitialized: boolean;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useRef, useState } from "react";
|
||||
|
||||
import { useChatDispatch } from "@/stores/chat/chat-context";
|
||||
import { useKeyboardHeight } from "@/hooks";
|
||||
import { Logger } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
import { ChatInputTextField } from "./chat-input-text-field";
|
||||
import { ChatSendButton } from "./chat-send-button";
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
canShowPwaInstallPromptOnce,
|
||||
recordPwaInstallPromptShown,
|
||||
} from "@/lib/chat/pwa_install_prompt";
|
||||
import { pwaUtil } from "@/utils";
|
||||
import { pwaUtil } from "@/utils/pwa";
|
||||
|
||||
import { PwaInstallDialog } from "./pwa-install-dialog";
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
peekPendingChatUnlock,
|
||||
} from "@/lib/navigation/chat_unlock_session";
|
||||
import { useChatDispatch } from "@/stores/chat/chat-context";
|
||||
import { Logger } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
const log = new Logger("UseChatPromotionBootstrap");
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import Link from "next/link";
|
||||
|
||||
import { ExceptionHandler } from "@/core/errors";
|
||||
import { ROUTES } from "@/router/routes";
|
||||
import { Logger } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
const log = new Logger("AppError");
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
savePendingChatPromotion,
|
||||
} from "@/lib/navigation/chat_unlock_session";
|
||||
import { ROUTES } from "@/router/routes";
|
||||
import { Logger } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
import { useAuthDispatch, useAuthState } from "@/stores/auth/auth-context";
|
||||
|
||||
const log = new Logger("ExternalEntryPersist");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { pwaUtil } from "@/utils";
|
||||
import { pwaUtil } from "@/utils/pwa";
|
||||
|
||||
type PwaInstallResult = Awaited<ReturnType<typeof pwaUtil.install>>;
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@ import type { LoginStatus } from "@/data/dto/auth";
|
||||
import { useHasHydrated } from "@/hooks/use-has-hydrated";
|
||||
import { loadSplashLatestMessagePreview } from "@/lib/chat/splash_latest_message";
|
||||
import { useSplashLatestMessageCache } from "@/providers/splash-latest-message-provider";
|
||||
import { Logger, Result } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
import { Result } from "@/utils/result";
|
||||
|
||||
const log = new Logger("SplashLatestMessage");
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { AppBottomNav, MobileShell } from "@/app/_components/core";
|
||||
import { ROUTES } from "@/router/routes";
|
||||
import { useAppNavigator } from "@/router/use-app-navigator";
|
||||
import { useAuthState } from "@/stores/auth/auth-context";
|
||||
import { pwaUtil } from "@/utils";
|
||||
import { pwaUtil } from "@/utils/pwa";
|
||||
|
||||
import {
|
||||
SplashBackground,
|
||||
|
||||
@@ -15,7 +15,7 @@ import { loadStripe } from "@stripe/stripe-js";
|
||||
|
||||
import { ExceptionHandler } from "@/core/errors";
|
||||
import { ROUTES } from "@/router/routes";
|
||||
import { Logger } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
import { stripePaymentDialogStyles as styles } from "./stripe-payment-dialog.styles";
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
usePaymentDispatch,
|
||||
usePaymentState,
|
||||
} from "@/stores/payment/payment-context";
|
||||
import { Logger } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
import { LazyStripePaymentDialog } from "./lazy-stripe-payment-dialog";
|
||||
import { stripePaymentDialogStyles as dialogStyles } from "./stripe-payment-dialog.styles";
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
usePaymentDispatch,
|
||||
usePaymentState,
|
||||
} from "@/stores/payment/payment-context";
|
||||
import { Logger } from "@/utils";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
import { LazyStripePaymentDialog } from "../subscription/components/lazy-stripe-payment-dialog";
|
||||
import { stripePaymentDialogStyles as dialogStyles } from "../subscription/components/stripe-payment-dialog.styles";
|
||||
|
||||
Reference in New Issue
Block a user