fix(ui): complete project button click
This commit is contained in:
parent
5226f60834
commit
aae01de0f7
1 changed files with 31 additions and 29 deletions
|
|
@ -6,6 +6,7 @@ import { withRouter } from 'react-router-dom';
|
|||
import * as routes from '../../../routes';
|
||||
import { indigo } from 'tailwindcss/colors';
|
||||
import { SquareArrowOutUpRight } from 'lucide-react';
|
||||
import { useHistory } from 'react-router';
|
||||
|
||||
|
||||
const withSiteId = routes.withSiteId;
|
||||
|
|
@ -17,6 +18,7 @@ const NoSessionsMessage = (props) => {
|
|||
sites,
|
||||
siteId
|
||||
} = props;
|
||||
const history = useHistory();
|
||||
const activeSite = sites.find((s) => s.id === siteId);
|
||||
const showNoSessions = !!activeSite && !activeSite.recorded;
|
||||
const onboardingPath = withSiteId(onboardingRoute('installing'), siteId);
|
||||
|
|
@ -24,35 +26,35 @@ const NoSessionsMessage = (props) => {
|
|||
return (
|
||||
<>
|
||||
{showNoSessions && (
|
||||
<div className="w-full mb-5">
|
||||
<Space direction="vertical" className="w-full">
|
||||
<Alert
|
||||
className="border-transparent rounded-lg w-full"
|
||||
message="Your sessions will appear here soon. It may take a few minutes as sessions are optimized for efficient playback."
|
||||
type="warning"
|
||||
showIcon
|
||||
action={
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
onClick={() => window.open('https://docs.openreplay.com/en/troubleshooting/session-recordings/', '_blank')}
|
||||
icon={<SquareArrowOutUpRight size={16} />}
|
||||
>
|
||||
Troubleshoot
|
||||
</Button>
|
||||
<Button
|
||||
type="default"
|
||||
size="small"
|
||||
onClick={() => history.push(onboardingPath)}
|
||||
>
|
||||
Complete Project Setup
|
||||
</Button>
|
||||
</Space>
|
||||
}
|
||||
/>
|
||||
</Space>
|
||||
</div>
|
||||
<div className="w-full mb-5">
|
||||
<Space direction="vertical" className="w-full">
|
||||
<Alert
|
||||
className="border-transparent rounded-lg w-full"
|
||||
message="Your sessions will appear here soon. It may take a few minutes as sessions are optimized for efficient playback."
|
||||
type="warning"
|
||||
showIcon
|
||||
action={
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
onClick={() => window.open('https://docs.openreplay.com/en/troubleshooting/session-recordings/', '_blank')}
|
||||
icon={<SquareArrowOutUpRight size={16} />}
|
||||
>
|
||||
Troubleshoot
|
||||
</Button>
|
||||
<Button
|
||||
type="default"
|
||||
size="small"
|
||||
onClick={() => history.push(onboardingPath)}
|
||||
>
|
||||
Complete Project Setup
|
||||
</Button>
|
||||
</Space>
|
||||
}
|
||||
/>
|
||||
</Space>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue