Fix Discord login and update deployment configuration
Correct Discord login flow by falling back to window.location.origin when VITE_API_BASE is not set. Update deployment configuration for autoscale and remove dead reference in Login.tsx. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 364421d0-abed-4b4a-a686-4aa79792a4a3 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/LFvmEVc Replit-Helium-Checkpoint-Created: true
This commit is contained in:
parent
44a75dd30d
commit
8bf8584fa6
3 changed files with 7 additions and 6 deletions
4
.replit
4
.replit
|
|
@ -47,6 +47,10 @@ externalPort = 3003
|
|||
localPort = 8080
|
||||
externalPort = 8080
|
||||
|
||||
[[ports]]
|
||||
localPort = 34145
|
||||
externalPort = 4200
|
||||
|
||||
[[ports]]
|
||||
localPort = 38557
|
||||
externalPort = 3000
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import { supabase } from "@/lib/supabase";
|
|||
import { UserProfile } from "@/lib/database.types";
|
||||
import { aethexToast } from "@/lib/aethex-toast";
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_BASE || "";
|
||||
const API_BASE = import.meta.env.VITE_API_BASE || (typeof window !== 'undefined' ? window.location.origin : "");
|
||||
import {
|
||||
aethexUserService,
|
||||
aethexRoleService,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useState, useEffect } from "react";
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_BASE || "";
|
||||
const API_BASE = import.meta.env.VITE_API_BASE || window.location.origin;
|
||||
|
||||
import { useNavigate, Link, useLocation } from "react-router-dom";
|
||||
import { aethexUserService } from "@/lib/aethex-database-adapter";
|
||||
|
|
@ -567,10 +567,7 @@ export default function Login() {
|
|||
? "Already have an account?"
|
||||
: "Don't have an account?"}{" "}
|
||||
<button
|
||||
onClick={() => {
|
||||
setIsSignUp((prev) => !prev);
|
||||
setManualVerificationLink(null);
|
||||
}}
|
||||
onClick={() => setIsSignUp((prev) => !prev)}
|
||||
className="text-aethex-400 hover:underline font-medium"
|
||||
>
|
||||
{isSignUp ? "Sign In" : "Join AeThex"}
|
||||
|
|
|
|||
Loading…
Reference in a new issue