Skip to content
Snippets Groups Projects
Commit 9b00b40e authored by Rene Fernandez Sanchez's avatar Rene Fernandez Sanchez
Browse files

Merge branch 'handle_hostname' into 'test'

Add getParentHostname function

See merge request !19
parents de562e53 46f25773
Branches
No related tags found
3 merge requests!25Feature/update paella plugins,!22Use referer url for the embeds sso checking,!19Add getParentHostname function
Pipeline #6001193 passed
import React, { useEffect } from "react";
import App from "./App";
import AuthService from "services/auth-service";
import { getCurrentHostname, getUrlParameter } from "utils/urls";
import {
getCurrentHostname,
getParentHostname,
getUrlParameter,
} from "utils/urls";
export default function Main() {
const [initialized, setInitialized] = React.useState(false);
......@@ -13,6 +17,7 @@ export default function Main() {
};
const embed = getUrlParameter("embed");
console.log("hostname", getCurrentHostname());
console.log("Parent hostname", getParentHostname());
if (embed === "true") {
setInitialized(true);
} else {
......
......@@ -12,4 +12,8 @@ export function getCurrentHostname() {
return window.location.hostname;
}
export function getParentHostname() {
return document.referrer;
}
export default getUrlParameter;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment