Use env vars

This commit is contained in:
schroda
2025-08-02 23:13:50 +02:00
parent 4f5754399b
commit 5543e134fa
16 changed files with 63 additions and 46 deletions

View File

@@ -99,7 +99,10 @@ export const ServerSettings = () => {
});
const [mutateSettings] = requestManager.useUpdateServerSettings();
const [serverAddress, setServerAddress] = useLocalStorage<string>('serverBaseURL', window.location.origin);
const [serverAddress, setServerAddress] = useLocalStorage<string>(
'serverBaseURL',
import.meta.env.VITE_SERVER_URL_DEFAULT,
);
const handleServerAddressChange = (address: string) => {
const serverBaseUrl = address.replaceAll(/(\/)+$/g, '');