Skip to content

armgit / ente

Public Imported from GitHub
0

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

Also on standalone pages

Manav Rathica0af1f53ab9
diff --git a/web/packages/accounts/pages/login.tsx b/web/packages/accounts/pages/login.tsx
index ce9c8915f7..b6ea5ed207 100644
--- a/web/packages/accounts/pages/login.tsx
+++ b/web/packages/accounts/pages/login.tsx
@@ -1,3 +1,4 @@
+import { customAPIHost } from "@/next/origins";
import { VerticallyCentered } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner";
import FormPaper from "@ente/shared/components/Form/FormPaper";
@@ -15,6 +16,8 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
const router = useRouter();
+ const host = customAPIHost();
+
useEffect(() => {
const user = getData(LS_KEYS.USER);
if (user?.email) {
@@ -24,7 +27,7 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
showNavBar(true);
}, []);
- const register = () => {
+ const signUp = () => {
router.push(PAGES.SIGNUP);
};
@@ -35,7 +38,7 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
) : (
<VerticallyCentered>
<FormPaper>
- <Login signUp={register} appName={appName} />
+ <Login {...{ appName, signUp, host }} />
</FormPaper>
</VerticallyCentered>
);
diff --git a/web/packages/accounts/pages/signup.tsx b/web/packages/accounts/pages/signup.tsx
index ce7e14e568..c55a2a13e0 100644
--- a/web/packages/accounts/pages/signup.tsx
+++ b/web/packages/accounts/pages/signup.tsx
@@ -1,3 +1,4 @@
+import { customAPIHost } from "@/next/origins";
import { PAGES } from "@ente/accounts/constants/pages";
import { LS_KEYS, getData } from "@ente/shared//storage/localStorage";
import { VerticallyCentered } from "@ente/shared/components/Container";
@@ -15,6 +16,8 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
const router = useRouter();
+ const host = customAPIHost();
+
useEffect(() => {
const user = getData(LS_KEYS.USER);
if (user?.email) {
@@ -34,7 +37,7 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
<EnteSpinner />
) : (
<FormPaper>
- <SignUp login={login} router={router} appName={appName} />
+ <SignUp {...{ appName, login, router, host }} />
</FormPaper>
)}
</VerticallyCentered>