import { RequestContext } from '../../../../pages/request-details/Request.context'; import NavigationLink from '../../../../core/components/navigation-link/NavigationLink'; import React, { useContext } from 'react'; const ViewSessionRequestsLink = ({ count, sessionId }: IViewSessionRequestsProps) => { const { actions } = useContext(RequestContext); const handleClick = () => { actions.handler({type: 'DrilldownNavigation', data: {type: 'DrilldownViewRequests', sessionId}}); }; return ( <> { count === 1 ? (
No more requests in the session {sessionId}
) : (<>
{count} requests in the session {sessionId}
) } ) } export default ViewSessionRequestsLink; export interface IViewSessionRequestsProps { count: number; sessionId: number; }