浏览代码

Clean up utils

Manav Rathi 1 年之前
父节点
当前提交
ac01f7a12a

+ 1 - 1
web/apps/payments/src/pages/404.tsx

@@ -1,5 +1,5 @@
 import { Container } from "components/Container";
-import constants from "utils/strings/constants";
+import constants from "utils/strings";
 
 export default function Home() {
     return <Container>{constants.NOT_FOUND}</Container>;

+ 1 - 1
web/apps/payments/src/pages/_app.tsx

@@ -1,7 +1,7 @@
 import "bootstrap/dist/css/bootstrap.min.css";
 import type { AppProps } from "next/app";
 import Head from "next/head";
-import constants from "utils/strings/constants";
+import constants from "utils/strings";
 import "../styles/globals.css";
 
 function MyApp({ Component, pageProps }: AppProps) {

+ 1 - 1
web/apps/payments/src/pages/index.tsx

@@ -3,7 +3,7 @@ import EnteSpinner from "components/EnteSpinner";
 import * as React from "react";
 import { parseAndHandleRequest } from "services/billingService";
 import { CUSTOM_ERROR } from "utils/error";
-import constants from "utils/strings/constants";
+import constants from "utils/strings";
 
 export default function Home() {
     const [errorMessageView, setErrorMessageView] = React.useState(false);

+ 1 - 1
web/apps/payments/src/services/billingService.ts

@@ -8,7 +8,7 @@
 
 import { loadStripe } from "@stripe/stripe-js";
 import { CUSTOM_ERROR } from "utils/error";
-import { logError } from "utils/sentry";
+import { logError } from "utils/log";
 import HTTPService from "./HTTPService";
 
 const getStripePublishableKey = (stripeAccount: StripeAccountCountry) => {

+ 0 - 3
web/apps/payments/src/utils/common.ts

@@ -1,3 +0,0 @@
-export function runningInBrowser() {
-    return typeof window !== "undefined";
-}

+ 0 - 0
web/apps/payments/src/utils/error/index.ts → web/apps/payments/src/utils/error.ts


+ 0 - 0
web/apps/payments/src/utils/sentry/index.ts → web/apps/payments/src/utils/log.ts


+ 1 - 0
web/apps/payments/src/utils/strings/constants.tsx → web/apps/payments/src/utils/strings.ts

@@ -3,4 +3,5 @@ const englishConstants = {
     SOMETHING_WENT_WRONG: "Oops, something went wrong.",
     NOT_FOUND: "404 | This page could not be found.",
 };
+
 export default englishConstants;