diff --git a/frontend/src/App.js b/frontend/src/App.js index 0bc593b7..9b66c2b3 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -2,7 +2,6 @@ import { Link, Typography } from '@mui/material'; import Dz from './Dz' import ResponsiveAppBar from './ResponsiveAppBar' -import Disclaimer from './Disclaimer'; import Footer from './Footer' import Grid from '@mui/material/Grid'; import Box from '@mui/material/Box'; @@ -124,16 +123,7 @@ function App() { fetch(context.sandboxId ? `${FETCH_PATH}/api/sandbox/me/${context.sandboxId}` : `${FETCH_PATH}/api/me`, { credentials: 'include', 'x-csrf-token': getCookieValue('csrftoken') }) .then(response => response.json()) .then((data) => { - if (data["redirect"] !== undefined && data["redirect"] !== null) { - /* - // In Dashboard.js we do redirect, but not here - // @todo clean-up some duplication in the react code - if (!window.location.href.endsWith(data.redirect)) { - window.location.href = data.redirect; - } - */ - } - else { + if (data["redirect"] === undefined || data["redirect"] === null) { setLogin(true); setUser(data["user_data"]); data["sandbox_info"]["pr_title"] && setPrTitle(data["sandbox_info"]["pr_title"]); @@ -199,33 +189,6 @@ function App() { borderRadius: "0 0 16px 16px" }} >Sandbox for {prTitle}} - { - false && - } - - {false && - - - - - } - -
- Validate your IFC files against the standard - A free, online platform by buildingSMART for checking IFC file conformity against STEP syntax, IFC schema, and normative specification rules. - Start validating → -
+ {isLoggedIn ? ( + + + + + + + ) : ( +
+ Validate your IFC files against the standard + A free, online platform by buildingSMART for checking IFC file conformity against STEP syntax, IFC schema, and normative specification rules. + Start validating → +
+ )} How it checks Four layers of validation diff --git a/frontend/src/ResponsiveAppBar.js b/frontend/src/ResponsiveAppBar.js index 30855537..964db2d7 100644 --- a/frontend/src/ResponsiveAppBar.js +++ b/frontend/src/ResponsiveAppBar.js @@ -19,13 +19,13 @@ import { useContext } from 'react'; -function AppLogo() { +function AppLogo({ href }) { const mystyle = { height: "60px" }; return ( - + ) @@ -71,7 +71,7 @@ function ResponsiveAppBar({ user }) { - + {user && @@ -86,7 +86,7 @@ function ResponsiveAppBar({ user }) { }, }} > - {user ? (Array.from(user["given_name"])[0] + Array.from(user["family_name"])[0]) : ""} + {Array.from(user["given_name"])[0] + Array.from(user["family_name"])[0]}