not using localStorage for the API endpoint if an env variable is set

This commit is contained in:
Gabriel mermelstein 2024-06-12 14:20:31 +02:00
parent ad03585d30
commit 1cd19c108e
No known key found for this signature in database
GPG Key ID: 82B8134785FEAE0D

View File

@ -73,7 +73,7 @@ function App() {
setUsername(name);
const endpoint = localStorage.getItem("apiEndpoint");
if (endpoint) {
if (endpoint && !import.meta.env.VITE_API_ENDPOINT) {
setApiEndpoint(endpoint);
}