fix(ui): onboarding route and menu
This commit is contained in:
parent
3f858132c3
commit
c69226e7bc
5 changed files with 8 additions and 4 deletions
|
|
@ -203,6 +203,7 @@ const Router: React.FC<RouterProps> = (props) => {
|
||||||
(location.pathname && location.pathname.includes('/session/')) ||
|
(location.pathname && location.pathname.includes('/session/')) ||
|
||||||
location.pathname.includes('/assist/') ||
|
location.pathname.includes('/assist/') ||
|
||||||
location.pathname.includes('multiview');
|
location.pathname.includes('multiview');
|
||||||
|
const hideMenu = hideHeader || location.pathname.includes('/onboarding/');
|
||||||
|
|
||||||
// const isPlayer =
|
// const isPlayer =
|
||||||
// isRoute(SESSION_PATH, location.pathname) ||
|
// isRoute(SESSION_PATH, location.pathname) ||
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ const Onboarding = (props: Props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="page-margin container-90 flex relative">
|
<div className="container-90 flex relative">
|
||||||
<div className="side-menu">
|
<div className="side-menu">
|
||||||
<SideMenu activeTab={activeTab} onClick={onMenuItemClick} />
|
<SideMenu activeTab={activeTab} onClick={onMenuItemClick} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@ const NoSessionsMessage = (props) => {
|
||||||
} = props;
|
} = props;
|
||||||
const activeSite = sites.find((s) => s.id === siteId);
|
const activeSite = sites.find((s) => s.id === siteId);
|
||||||
const showNoSessions = !!activeSite && !activeSite.recorded;
|
const showNoSessions = !!activeSite && !activeSite.recorded;
|
||||||
|
const onboardingPath = withSiteId(onboardingRoute('installing'), siteId);
|
||||||
|
console.log('onboardingPath', onboardingPath, siteId);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{showNoSessions && (
|
{showNoSessions && (
|
||||||
|
|
@ -36,7 +38,7 @@ const NoSessionsMessage = (props) => {
|
||||||
<Button
|
<Button
|
||||||
variant='primary'
|
variant='primary'
|
||||||
className='bg-white h-8 hover:bg-gray-light text-base'
|
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
|
Complete Project Setup
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,14 @@ interface Props {
|
||||||
function Layout(props: Props) {
|
function Layout(props: Props) {
|
||||||
const { hideHeader, siteId } = props;
|
const { hideHeader, siteId } = props;
|
||||||
const isPlayer = /\/(session|assist)\//.test(window.location.pathname);
|
const isPlayer = /\/(session|assist)\//.test(window.location.pathname);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AntLayout style={{ minHeight: '100vh' }}>
|
<AntLayout style={{ minHeight: '100vh' }}>
|
||||||
{!hideHeader && (
|
{!hideHeader && (
|
||||||
<TopHeader />
|
<TopHeader />
|
||||||
)}
|
)}
|
||||||
<AntLayout>
|
<AntLayout>
|
||||||
{!hideHeader && (
|
{!hideHeader && !window.location.pathname.includes('/onboarding/') && (
|
||||||
<Sider
|
<Sider
|
||||||
style={{
|
style={{
|
||||||
position: 'sticky',
|
position: 'sticky',
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ const REQUIRED_SITE_ID_ROUTES = [
|
||||||
|
|
||||||
error(''),
|
error(''),
|
||||||
errors(),
|
errors(),
|
||||||
onboarding(),
|
onboarding(''),
|
||||||
funnels(),
|
funnels(),
|
||||||
funnelsCreate(),
|
funnelsCreate(),
|
||||||
funnel(''),
|
funnel(''),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue