Skip to content

Commit f528a2c

Browse files
committed
Use a list of elements, instead of wrapping in a useless div
1 parent 195716f commit f528a2c

File tree

1 file changed

+29
-24
lines changed
  • src/sentry/static/sentry/app/components/events/interfaces

1 file changed

+29
-24
lines changed

src/sentry/static/sentry/app/components/events/interfaces/request.jsx

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -57,31 +57,36 @@ var RequestInterface = React.createClass({
5757
var parsedUrl = document.createElement("a");
5858
parsedUrl.href = fullUrl;
5959

60+
var children = [];
61+
62+
if (!this.isPartial()) {
63+
children.push(
64+
<div className="pull-right">
65+
{!this.props.isShare &&
66+
<RequestActions organization={this.context.organization}
67+
project={this.context.project}
68+
group={group}
69+
event={evt} />
70+
}
71+
</div>,
72+
<div className="btn-group">
73+
<a className={(view === "rich" ? "active" : "") + " btn btn-default btn-sm"}
74+
onClick={this.toggleView.bind(this, "rich")}>Rich</a>
75+
<a className={(view === "curl" ? "active" : "") + " btn btn-default btn-sm"}
76+
onClick={this.toggleView.bind(this, "curl")}><code>curl</code></a>
77+
</div>
78+
);
79+
}
80+
81+
children.push(
82+
<h3>
83+
<strong>{data.method || 'GET'} <a href={fullUrl}>{parsedUrl.pathname}</a></strong>
84+
<small style={{marginLeft: 20}}>{parsedUrl.hostname}</small>
85+
</h3>
86+
);
87+
6088
var title = (
61-
<div>
62-
{!this.isPartial() &&
63-
<div>
64-
<div className="pull-right">
65-
{!this.props.isShare &&
66-
<RequestActions organization={this.context.organization}
67-
project={this.context.project}
68-
group={group}
69-
event={evt} />
70-
}
71-
</div>
72-
<div className="btn-group">
73-
<a className={(view === "rich" ? "active" : "") + " btn btn-default btn-sm"}
74-
onClick={this.toggleView.bind(this, "rich")}>Rich</a>
75-
<a className={(view === "curl" ? "active" : "") + " btn btn-default btn-sm"}
76-
onClick={this.toggleView.bind(this, "curl")}><code>curl</code></a>
77-
</div>
78-
</div>
79-
}
80-
<h3>
81-
<strong>{data.method || 'GET'} <a href={fullUrl}>{parsedUrl.pathname}</a></strong>
82-
<small style={{marginLeft: 20}}>{parsedUrl.hostname}</small>
83-
</h3>
84-
</div>
89+
<div>{children}</div>
8590
);
8691

8792
return (

0 commit comments

Comments
 (0)