Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Clean up utils

Manav Rathiac01f7a12abc
diff --git a/web/apps/payments/src/pages/404.tsx b/web/apps/payments/src/pages/404.tsx
index 17911a7fc6..4e1bd8f260 100644
--- a/web/apps/payments/src/pages/404.tsx
+++ b/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>;
diff --git a/web/apps/payments/src/pages/_app.tsx b/web/apps/payments/src/pages/_app.tsx
index 17db6086b2..c60a2073c1 100644
--- a/web/apps/payments/src/pages/_app.tsx
+++ b/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) {
diff --git a/web/apps/payments/src/pages/index.tsx b/web/apps/payments/src/pages/index.tsx
index b4aad2a0e2..6915807938 100644
--- a/web/apps/payments/src/pages/index.tsx
+++ b/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);
diff --git a/web/apps/payments/src/services/billingService.ts b/web/apps/payments/src/services/billingService.ts
index c7a6a17e94..9224129d3d 100644
--- a/web/apps/payments/src/services/billingService.ts
+++ b/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) => {
diff --git a/web/apps/payments/src/utils/common.ts b/web/apps/payments/src/utils/common.ts
deleted file mode 100644
index 7796b13036..0000000000
--- a/web/apps/payments/src/utils/common.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export function runningInBrowser() {
- return typeof window !== "undefined";
-}
diff --git a/web/apps/payments/src/utils/error/index.ts b/web/apps/payments/src/utils/error.ts
similarity index 100%
rename from web/apps/payments/src/utils/error/index.ts
rename to web/apps/payments/src/utils/error.ts
diff --git a/web/apps/payments/src/utils/sentry/index.ts b/web/apps/payments/src/utils/log.ts
similarity index 100%
rename from web/apps/payments/src/utils/sentry/index.ts
rename to web/apps/payments/src/utils/log.ts
diff --git a/web/apps/payments/src/utils/strings/constants.tsx b/web/apps/payments/src/utils/strings.ts
similarity index 99%
rename from web/apps/payments/src/utils/strings/constants.tsx
rename to web/apps/payments/src/utils/strings.ts
index e08c6d558d..44ba64b8fe 100644
--- a/web/apps/payments/src/utils/strings/constants.tsx
+++ b/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;