Skip to content

Commit f8f881c

Browse files
committed
Edit Profile: Preload headers on the backend
1 parent 26a8bf0 commit f8f881c

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

civictechprojects/helpers/context_preload.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ def about_us_preload(context, query_args):
2424
return context
2525

2626

27+
def edit_profile_preload(context, query_args):
28+
context = default_preload(context, query_args)
29+
context['title'] = 'Update User Profile | DemocracyLab'
30+
context['description'] = 'Update User Profile page'
31+
return context
32+
33+
2734
def default_preload(context, query_args):
2835
context['title'] = 'DemocracyLab'
2936
context['description'] = 'Everyone has something to contribute to the technical solutions society needs. ' \
@@ -35,6 +42,7 @@ def default_preload(context, query_args):
3542

3643
preload_urls = [
3744
{'section': FrontEndSection.AboutProject.value, 'handler': about_project_preload},
45+
{'section': FrontEndSection.EditProfile.value, 'handler': edit_profile_preload},
3846
{'section': FrontEndSection.AboutUs.value, 'handler': about_us_preload}
3947
]
4048

common/components/controllers/EditProfileController.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import urlHelper from "../utils/url.js";
1919
import metrics from "../utils/metrics.js";
2020
import CurrentUser from "../utils/CurrentUser.js";
2121
import _ from 'lodash';
22-
import Headers from "../common/Headers.jsx";
2322
import url from "../utils/url.js";
2423

2524
const UserLinkNames = ['link_linkedin'];
@@ -182,10 +181,6 @@ class EditProfileController extends React.PureComponent<{||},State> {
182181
render(): React$Node {
183182
return (
184183
<React.Fragment>
185-
<Headers
186-
title="Update User Profile | DemocracyLab"
187-
description="Update User Profile page"
188-
/>
189184
<div className="wrapper-gray">
190185
<div className="container">
191186
<form action={`/api/user/edit/${this.state.userId}/`} method="post">

0 commit comments

Comments
 (0)