fix(ui): onboarding route and menu

This commit is contained in:
Shekar Siri 2023-09-04 18:10:49 +05:30
parent 3f858132c3
commit c69226e7bc
5 changed files with 8 additions and 4 deletions

View file

@ -203,6 +203,7 @@ const Router: React.FC<RouterProps> = (props) => {
(location.pathname && location.pathname.includes('/session/')) ||
location.pathname.includes('/assist/') ||
location.pathname.includes('multiview');
const hideMenu = hideHeader || location.pathname.includes('/onboarding/');
// const isPlayer =
// isRoute(SESSION_PATH, location.pathname) ||

View file

@ -33,7 +33,7 @@ const Onboarding = (props: Props) => {
}
return (
<div className="page-margin container-90 flex relative">
<div className="container-90 flex relative">
<div className="side-menu">
<SideMenu activeTab={activeTab} onClick={onMenuItemClick} />
</div>

View file

@ -14,6 +14,8 @@ const NoSessionsMessage = (props) => {
} = props;
const activeSite = sites.find((s) => s.id === siteId);
const showNoSessions = !!activeSite && !activeSite.recorded;
const onboardingPath = withSiteId(onboardingRoute('installing'), siteId);
console.log('onboardingPath', onboardingPath, siteId);
return (
<>
{showNoSessions && (
@ -36,7 +38,7 @@ const NoSessionsMessage = (props) => {
<Button
variant='primary'
className='bg-white h-8 hover:bg-gray-light text-base'
onClick={() => props.history.push(withSiteId(onboardingRoute('installing'), siteId))}
onClick={() => props.history.push(onboardingPath)}
>
Complete Project Setup
</Button>

View file

@ -14,13 +14,14 @@ interface Props {
function Layout(props: Props) {
const { hideHeader, siteId } = props;
const isPlayer = /\/(session|assist)\//.test(window.location.pathname);
return (
<AntLayout style={{ minHeight: '100vh' }}>
{!hideHeader && (
<TopHeader />
)}
<AntLayout>
{!hideHeader && (
{!hideHeader && !window.location.pathname.includes('/onboarding/') && (
<Sider
style={{
position: 'sticky',

View file

@ -165,7 +165,7 @@ const REQUIRED_SITE_ID_ROUTES = [
error(''),
errors(),
onboarding(),
onboarding(''),
funnels(),
funnelsCreate(),
funnel(''),