Skip to content

Commit

Permalink
[frontend] remove duplicate header (#6401)
Browse files Browse the repository at this point in the history
  • Loading branch information
frapuks authored Mar 22, 2024
1 parent 0330878 commit 0c8c045
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { graphql, createFragmentContainer } from 'react-relay';
import EntityStixCoreRelationships from '../../common/stix_core_relationships/EntityStixCoreRelationships';
import StixDomainObjectKnowledge from '../../common/stix_domain_objects/StixDomainObjectKnowledge';
import StixCoreRelationship from '../../common/stix_core_relationships/StixCoreRelationship';
import EventPopover from './EventPopover';
import StixDomainObjectHeader from '../../common/stix_domain_objects/StixDomainObjectHeader';
import StixSightingRelationship from '../../events/stix_sighting_relationships/StixSightingRelationship';

class EventKnowledgeComponent extends Component {
Expand All @@ -15,11 +13,6 @@ class EventKnowledgeComponent extends Component {
const link = `/dashboard/entities/events/${event.id}/knowledge`;
return (
<>
<StixDomainObjectHeader
entityType={'Event'}
stixDomainObject={event}
PopoverComponent={<EventPopover />}
/>
<Switch>
<Route
exact
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,12 @@ import PropTypes from 'prop-types';
import { Route, Switch, withRouter } from 'react-router-dom';
import { graphql, createFragmentContainer } from 'react-relay';
import StixCoreRelationship from '../../common/stix_core_relationships/StixCoreRelationship';
import CourseOfActionPopover from './CourseOfActionPopover';
import StixDomainObjectHeader from '../../common/stix_domain_objects/StixDomainObjectHeader';

class CourseOfActionKnowledgeComponent extends Component {
render() {
const { courseOfAction } = this.props;
return (
<>
<StixDomainObjectHeader
entityType="Course-Of-Action"
stixDomainObject={courseOfAction}
PopoverComponent={<CourseOfActionPopover />}
isOpenctiAlias={true}
/>
<Switch>
<Route
exact
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,7 @@ class RootCourseOfAction extends Component {
if (props.courseOfAction) {
const { courseOfAction } = props;
return (
<div
style={{
paddingRight: location.pathname.includes(
`/dashboard/techniques/courses_of_action/${courseOfAction.id}/knowledge`,
)
? 200
: 0,
}}
>
<div>
<Breadcrumbs variant="object" elements={[
{ label: t('Techniques') },
{ label: t('Courses of action'), link: '/dashboard/techniques/courses_of_action' },
Expand All @@ -126,7 +118,7 @@ class RootCourseOfAction extends Component {
location.pathname.includes(
`/dashboard/techniques/courses_of_action/${courseOfAction.id}/knowledge`,
)
? `/dashboard/techniques/courses_of_action/${courseOfAction.id}/knowledge`
? `/dashboard/techniques/courses_of_action/${courseOfAction.id}`
: location.pathname
}
>
Expand Down

0 comments on commit 0c8c045

Please sign in to comment.