Compare commits
4 Commits
20260402
...
renovate/e
| Author | SHA1 | Date | |
|---|---|---|---|
| 658f65510f | |||
| 3c8b22d642 | |||
| c5da8414f3 | |||
| bd701c687f |
@@ -46,7 +46,7 @@
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-react": "^6.0.1",
|
||||
"eslint": "^10.1.0",
|
||||
"eslint-plugin-react-hooks": "0.0.0-experimental-80b1cab3-20260331",
|
||||
"eslint-plugin-react-hooks": "7.0.1",
|
||||
"eslint-plugin-react-refresh": "^0.5.2",
|
||||
"globals": "^17.4.0",
|
||||
"typescript": "^6.0.2",
|
||||
|
||||
@@ -25,6 +25,15 @@ export class APIClient {
|
||||
return URL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the full URL at which the backend can be contacted
|
||||
*/
|
||||
static ActualBackendURL(): string {
|
||||
const backendURL = this.backendURL();
|
||||
if (backendURL.startsWith("/")) return `${location.origin}${backendURL}`;
|
||||
else return backendURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check out whether the backend is accessed through
|
||||
* HTTPS or not
|
||||
|
||||
@@ -38,7 +38,7 @@ export class AccommodationsCalendarURLApi {
|
||||
* Get accommodation calendar URL route
|
||||
*/
|
||||
static CalendarURL(c: AccommodationCalendarURL): string {
|
||||
return `${APIClient.backendURL()}/acccommodations_calendar/${c.token}`;
|
||||
return `${APIClient.ActualBackendURL()}/acccommodations_calendar/${c.token}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,9 @@ import {
|
||||
OutlinedInput,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
import QRCode from "react-qr-code";
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
import { QRCode } from "react-qr-code";
|
||||
import {
|
||||
AccommodationCalendarURL,
|
||||
AccommodationsCalendarURLApi,
|
||||
|
||||
@@ -87,6 +87,7 @@ export function LoginRoute(): React.ReactElement {
|
||||
// eslint-disable-next-line react-hooks/immutability
|
||||
window.location.href = res.url;
|
||||
} catch (e) {
|
||||
setLoading(false);
|
||||
console.error(e);
|
||||
setError("Echec de l'initialisation de l'authentification OpenID !");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user