mirror of
https://github.com/hex248/sprint.git
synced 2026-02-07 18:23:03 +00:00
VITE_* for VITE_SERVER_URL
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
DATABASE_URL=postgres://eussi:password@localhost:5432/issue
|
||||
|
||||
# comma separated list of allowed origins
|
||||
CORS_ORIGIN=http://localhost:1420
|
||||
CORS_ORIGIN=http://localhost:1420
|
||||
|
||||
JWT_SECRET=TOP_SECRET_JWT_MUST_CHANGE
|
||||
@@ -1 +1 @@
|
||||
SERVER_URL=http://localhost:1420
|
||||
VITE_SERVER_URL=http://localhost:3000
|
||||
|
||||
@@ -8,7 +8,7 @@ import { getAuthHeaders } from "@/lib/utils";
|
||||
import LogOutButton from "./components/log-out-button";
|
||||
|
||||
function Index() {
|
||||
const serverURL = import.meta.env.SERVER_URL?.trim() || "http://localhost:3000";
|
||||
const serverURL = import.meta.env.VITE_SERVER_URL?.trim() || "http://localhost:3000";
|
||||
|
||||
const user = JSON.parse(localStorage.getItem("user") || "{}") as UserRecord;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ type AuthProviderProps = {
|
||||
};
|
||||
|
||||
export function Auth({ children }: AuthProviderProps) {
|
||||
const serverURL = import.meta.env.SERVER_URL?.trim() || "http://localhost:3000";
|
||||
const serverURL = import.meta.env.VITE_SERVER_URL?.trim() || "http://localhost:3000";
|
||||
|
||||
const [loggedIn, setLoggedIn] = useState<boolean>();
|
||||
const fetched = useRef(false);
|
||||
|
||||
@@ -38,7 +38,7 @@ function Field({
|
||||
}
|
||||
|
||||
export default function LogInForm() {
|
||||
const serverURL = import.meta.env.SERVER_URL?.trim() || "http://localhost:3000";
|
||||
const serverURL = import.meta.env.VITE_SERVER_URL?.trim() || "http://localhost:3000";
|
||||
|
||||
const [mode, setMode] = useState<"login" | "register">("login");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user