Skip to content

Commit 8b50b50

Browse files
authored
REmoved banner and footer (#3120)
1 parent 48c2b91 commit 8b50b50

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

frontend/public/src/containers/App.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ export class App extends React.Component<Props, void> {
6767
}
6868
}
6969

70+
isEcomServiceMode() {
71+
const { location } = this.props
72+
const searchParams = new URLSearchParams(location.search)
73+
return searchParams.has("ecom-service")
74+
}
75+
7076
render() {
7177
const { match, currentUser, cartItemsCount, location } = this.props
7278
if (!currentUser) {
@@ -76,11 +82,13 @@ export class App extends React.Component<Props, void> {
7682

7783
return (
7884
<div className="app" aria-flowto="notifications-container">
79-
<Header
80-
currentUser={currentUser}
81-
cartItemsCount={currentUser.is_authenticated ? cartItemsCount : 0}
82-
location={location}
83-
/>
85+
{!this.isEcomServiceMode() && (
86+
<Header
87+
currentUser={currentUser}
88+
cartItemsCount={currentUser.is_authenticated ? cartItemsCount : 0}
89+
location={location}
90+
/>
91+
)}
8492
<div id="main" className="main-page-content">
8593
<Switch>
8694
<Route

main/templates/base.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{% include "partials/gtm_body.html" %}
3535

3636
{% include 'hijack/notification.html' %}
37-
{% if not request.path|startswith:'/certificate/' %}
37+
{% if not request.path|startswith:'/certificate/' and 'ecom-service' not in request.GET %}
3838
{% banner %}
3939
{% block headercontent %}
4040
<div id="header"></div>
@@ -48,9 +48,11 @@
4848
{% block contact-us %}
4949
{% endblock %}
5050
</div>
51+
{% if 'ecom-service' not in request.GET %}
5152
{% block footer %}
5253
{% include "footer.html" %}
5354
{% endblock %}
55+
{% endif %}
5456
{% render_bundle 'django' %}
5557
{% block scripts %}
5658
{# Script to defer youtube video rendering #}

0 commit comments

Comments
 (0)