|
|
@ -1,8 +1,6 @@ |
|
|
|
import React, {useState} from 'react' |
|
|
|
import React, {useState} from 'react' |
|
|
|
import {Link, useLocation, useNavigate} from 'react-router-dom' |
|
|
|
import {Link, useLocation, useNavigate} from 'react-router-dom' |
|
|
|
import {Button, Modal, Tooltip, OverlayTrigger} from 'react-bootstrap' |
|
|
|
import {Button, Modal, Tooltip, OverlayTrigger} from 'react-bootstrap' |
|
|
|
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome' |
|
|
|
|
|
|
|
import {faHome, faBars, faChevronLeft, faChevronRight} from '@fortawesome/free-solid-svg-icons' |
|
|
|
|
|
|
|
import './index.scss' |
|
|
|
import './index.scss' |
|
|
|
|
|
|
|
|
|
|
|
function BackButton({entity}: any) { |
|
|
|
function BackButton({entity}: any) { |
|
|
@ -25,14 +23,14 @@ function BackButton({entity}: any) { |
|
|
|
role="button" |
|
|
|
role="button" |
|
|
|
> |
|
|
|
> |
|
|
|
<OverlayTrigger placement="right" overlay={<Tooltip id="tooltip-right">Leave tutorial</Tooltip>}> |
|
|
|
<OverlayTrigger placement="right" overlay={<Tooltip id="tooltip-right">Leave tutorial</Tooltip>}> |
|
|
|
<FontAwesomeIcon className="pl-1" icon={faHome} /> |
|
|
|
<i className="fas fa-home pl-1" /> |
|
|
|
</OverlayTrigger> |
|
|
|
</OverlayTrigger> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
{isDetailPage && ( |
|
|
|
{isDetailPage && ( |
|
|
|
<li className="nav-item"> |
|
|
|
<li className="nav-item"> |
|
|
|
<Link className="btn" to={`/list?id=${entity.id}`} title="Tutorial menu"> |
|
|
|
<Link className="btn" to={`/list?id=${entity.id}`} title="Tutorial menu"> |
|
|
|
<FontAwesomeIcon icon={faBars} /> |
|
|
|
<i className="fas fa-bars" /> |
|
|
|
</Link> |
|
|
|
</Link> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
)} |
|
|
|
)} |
|
|
@ -41,13 +39,13 @@ function BackButton({entity}: any) { |
|
|
|
<form className="form-inline"> |
|
|
|
<form className="form-inline"> |
|
|
|
{stepId > 0 && ( |
|
|
|
{stepId > 0 && ( |
|
|
|
<Link to={`/detail?id=${entity.id}&stepId=${stepId - 1}`}> |
|
|
|
<Link to={`/detail?id=${entity.id}&stepId=${stepId - 1}`}> |
|
|
|
<FontAwesomeIcon className="pr-1" icon={faChevronLeft} /> |
|
|
|
<i className="fas fa-chevron-left pr-1" /> |
|
|
|
</Link> |
|
|
|
</Link> |
|
|
|
)} |
|
|
|
)} |
|
|
|
{stepId + 1}/{entity && <div className="">{entity.steps.length}</div>} |
|
|
|
{stepId + 1}/{entity && <div className="">{entity.steps.length}</div>} |
|
|
|
{stepId < entity.steps.length - 1 && ( |
|
|
|
{stepId < entity.steps.length - 1 && ( |
|
|
|
<Link to={`/detail?id=${entity.id}&stepId=${stepId + 1}`}> |
|
|
|
<Link to={`/detail?id=${entity.id}&stepId=${stepId + 1}`}> |
|
|
|
<FontAwesomeIcon className="pl-1" icon={faChevronRight} /> |
|
|
|
<i className="fas fa-chevron-right pl-1" /> |
|
|
|
</Link> |
|
|
|
</Link> |
|
|
|
)} |
|
|
|
)} |
|
|
|
</form> |
|
|
|
</form> |
|
|
|