From d20a5d6435b511e0d1228f8121ca85c780fbe07a Mon Sep 17 00:00:00 2001 From: Tamara Date: Thu, 7 Mar 2024 01:29:10 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BD=D0=B0=D0=BB=D0=B8=D1=87=D0=B8=D1=8F=20=D1=82?= =?UTF-8?q?=D0=BE=D0=BA=D0=B5=D0=BD=D0=B0=20=D0=B2=20=D0=B0=D0=B4=D1=80?= =?UTF-8?q?=D0=B5=D1=81=D0=BD=D0=BE=D0=B9=20=D1=81=D1=82=D1=80=D0=BE=D0=BA?= =?UTF-8?q?=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Landing/Landing.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 ( <>