mirror of
https://github.com/20kaushik02/spotify-manager-web.git
synced 2025-12-06 07:54:07 +00:00
mmmm
This commit is contained in:
parent
47eb312ba1
commit
a7df0b4d30
@ -1,8 +1,10 @@
|
|||||||
export const backendDomain = process.env.REACT_APP_API_BASE_URL + "/";
|
export const backendDomain = process.env.REACT_APP_API_BASE_URL + "/";
|
||||||
export const spotifyPlaylistLinkPrefix = "https://open.spotify.com/playlist/";
|
export const spotifyPlaylistLinkPrefix = "https://open.spotify.com/playlist/";
|
||||||
|
|
||||||
export const authLoginURL = backendDomain + "api/auth/login";
|
export const authLoginURL = "api/auth/login";
|
||||||
export const authLogoutURL = backendDomain + "api/auth/logout";
|
export const authLoginFullURL = backendDomain + authLoginURL;
|
||||||
|
export const authLogoutURL = "api/auth/logout";
|
||||||
|
export const authLogoutFullURL = backendDomain + authLogoutURL;
|
||||||
|
|
||||||
export const authHealthCheckURL = "auth-health";
|
export const authHealthCheckURL = "auth-health";
|
||||||
export const authRefreshURL = "api/auth/refresh";
|
export const authRefreshURL = "api/auth/refresh";
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import styles from "./Login.module.css";
|
import styles from "./Login.module.css";
|
||||||
import { authLoginURL } from "../../api/paths";
|
import { authLoginFullURL } from "../../api/paths";
|
||||||
|
|
||||||
// auth through backend
|
// auth through backend
|
||||||
const Login = () => {
|
const Login = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const timeoutID = setTimeout(() => {
|
const timeoutID = setTimeout(() => {
|
||||||
window.open(authLoginURL, "_self");
|
window.open(authLoginFullURL, "_self");
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
return () => clearTimeout(timeoutID);
|
return () => clearTimeout(timeoutID);
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import styles from "./Logout.module.css";
|
import styles from "./Logout.module.css";
|
||||||
import { authLogoutURL } from "../../api/paths";
|
import { authLogoutFullURL } from "../../api/paths";
|
||||||
|
|
||||||
const Logout = () => {
|
const Logout = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const timeoutID = setTimeout(() => {
|
const timeoutID = setTimeout(() => {
|
||||||
window.open(authLogoutURL, "_self");
|
window.open(authLogoutFullURL, "_self");
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
return () => clearTimeout(timeoutID);
|
return () => clearTimeout(timeoutID);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user