Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Replaced deprecated CSS and React functions #258

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions client/src/components/IntroScreen/IntroScreen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}

.campaign-info__icon {
margin-right: $panel-padding-x / 2;
margin-right: calc($panel-padding-x / 2);

@include media-breakpoint-down(xs) {
display: none;
Expand All @@ -53,7 +53,7 @@
.campaign-info__buttons {
position: absolute;
top: $panel-padding-y;
right: $panel-padding-x / 2;
right: calc($panel-padding-x / 2);
}

.campaign-info__links {
Expand Down
12 changes: 6 additions & 6 deletions client/src/containers/CampaignAdmin/CampaignAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ class CampaignAdmin extends Component {
this.handleToggleMessage = this.handleToggleMessage.bind(this);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this and it seems to be working fine.

componentWillMount() {
componentDidMount() {
// Ensure default breadcrumbs are setup
const { breadcrumbs, title, router: { params: { id, view } } } = this.props;
if (breadcrumbs.length === 0) {
this.setBreadcrumbs(view, id, title);
}
}

componentWillReceiveProps(props) {
const { title, router: { params: { id, view } } } = props;
componentDidUpdate(prevProps) {
const { title, router: { params: { id, view } } } = this.props;
const hasChangedRoute = (
this.props.router.params.id !== id ||
this.props.router.params.view !== view ||
this.props.title !== title
prevProps.router.params.id !== id ||
prevProps.router.params.view !== view ||
prevProps.title !== title
);
if (hasChangedRoute) {
this.setBreadcrumbs(view, id, title);
Expand Down
2 changes: 1 addition & 1 deletion client/src/containers/CampaignAdmin/CampaignAdmin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
color: $brand-primary;
position: absolute;
right: $spacer;
bottom: $spacer * 2 / 3;
bottom: calc($spacer * 2 / 3);
font-size: $font-size-sm;

.font-icon-link {
Expand Down