diff --git a/src/pages/Landing/Landing.tsx b/src/pages/Landing/Landing.tsx index 1e65ef9c..eb36de1b 100644 --- a/src/pages/Landing/Landing.tsx +++ b/src/pages/Landing/Landing.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, {useEffect} from "react"; import { CssBaseline, useMediaQuery, useTheme } from "@mui/material"; import Header from "./HeaderLanding"; import Footer from "./FooterLanding"; @@ -14,10 +14,18 @@ import StartWithTemplates from "./StartWithTemplates"; import WhatTheFeatures from "./WhatTheFeatures"; import FullScreenDialog from "./headerMobileLanding"; import Collaboration from "./Collaboration"; +import { setAuthToken } from "@frontend/kitui"; export default function Landing() { const theme = useTheme(); const isTablet = useMediaQuery(theme.breakpoints.down(1000)); + useEffect(() => { + const currentUrl = window.location.search.split('=')[1] + if (currentUrl !== "") { + setAuthToken(currentUrl) + history.pushState(null, document.title, "/") + } + },[]) return ( <>