Skip to content

armgit / ente

Public Imported from GitHub
0

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

Using ENV variables to pass the host

atyabbin57629f26c063
diff --git a/infra/staff/src/App.tsx b/infra/staff/src/App.tsx
index be158c418b..e396175447 100644
--- a/infra/staff/src/App.tsx
+++ b/infra/staff/src/App.tsx
@@ -2,7 +2,9 @@ import React, { useEffect, useState } from "react";
import S from "./utils/strings";
export const App: React.FC = () => {
- const [serverUrl, setServerUrl] = useState("");
+ const [serverUrl, setServerUrl] = useState(
+ import.meta.env.VITE_ENTE_ENDPOINT || "",
+ );
const [token, setToken] = useState("");
const [email, setEmail] = useState("");
const [userData, setUserData] = useState<any>(null);
@@ -13,6 +15,7 @@ export const App: React.FC = () => {
if (storedToken) {
setToken(storedToken);
}
+ console.log(import.meta.env.VITE_ENTE_ENDPOINT);
}, []);
useEffect(() => {
@@ -148,21 +151,6 @@ export const App: React.FC = () => {
<h1>{S.hello}</h1>
<form className="input-form">
- <div className="input-group">
- <label>
- Server URL:
- <input
- type="text"
- value={serverUrl}
- onChange={(e) => setServerUrl(e.target.value)}
- style={{
- padding: "10px",
- margin: "10px",
- width: "100%",
- }}
- />
- </label>
- </div>
<div className="input-group">
<label>
Token:
@@ -180,7 +168,7 @@ export const App: React.FC = () => {
</div>
<div className="input-group">
<label>
- Emailid:
+ Email id:
<input
type="text"
value={email}