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.includes('/assist/') ||
|
||||
location.pathname.includes('multiview');
|
||||
const hideMenu = hideHeader || location.pathname.includes('/onboarding/');
|
||||
|
||||
// const isPlayer =
|
||||
// isRoute(SESSION_PATH, location.pathname) ||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ const REQUIRED_SITE_ID_ROUTES = [
|
|||
|
||||
error(''),
|
||||
errors(),
|
||||
onboarding(),
|
||||
onboarding(''),
|
||||
funnels(),
|
||||
funnelsCreate(),
|
||||
funnel(''),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue