Skip to content

Commit

Permalink
Merge pull request #258 from creative-commoners/pulls/2.0/fix-fronten…
Browse files Browse the repository at this point in the history
…d-warnings

FIX Replaced deprecated CSS and React functions
  • Loading branch information
Maxime Rainville authored Mar 24, 2023
2 parents c34b96e + 4cce0ff commit e0f29fc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
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);
}

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

0 comments on commit e0f29fc

Please sign in to comment.