Skip to content

Commit 9861ecb

Browse files
Merge pull request #489 from HackRU/env/dev
prod
2 parents f4627de + f3a6779 commit 9861ecb

4 files changed

Lines changed: 70 additions & 4 deletions

File tree

src/Defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const defaults = {
3333
"https://s3-us-west-2.amazonaws.com/hackru-internal/partners-logos/",
3434
teamInfo: "https://s3-us-west-2.amazonaws.com/hackru-internal/hackru-team/",
3535
freeze: false,
36-
teamru: true,
36+
teamru: false,
3737
teamru_user: false,
3838
volunteers: {
3939
display: true,

src/MLHBadge.jsx

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,61 @@
11
import React, { Component } from "react";
22

33
class MLHBadge extends Component {
4+
constructor(props) {
5+
super(props);
6+
this.handleScroll = this.handleScroll.bind(this);
7+
this.handleResize = this.handleResize.bind(this);
8+
this.state = {
9+
isVisible: true,
10+
badgeHeight: 0,
11+
};
12+
}
13+
14+
handleResize() {
15+
let badge = document.getElementById("mlh-trust-badge");
16+
if (badge == null) {
17+
return;
18+
}
19+
this.setState({
20+
badgeHeight: parseFloat(
21+
window
22+
.getComputedStyle(badge)
23+
.getPropertyValue("height")
24+
.replace("px", "")
25+
),
26+
});
27+
}
28+
29+
handleScroll() {
30+
let badgeHeight = this.state.badgeHeight;
31+
let offset = window.pageYOffset;
32+
if (offset < badgeHeight) {
33+
//At top
34+
this.setState({
35+
isVisible: true,
36+
});
37+
} else if (offset > badgeHeight) {
38+
this.setState({
39+
isVisible: false,
40+
});
41+
}
42+
}
43+
44+
componentDidMount() {
45+
window.addEventListener("scroll", this.handleScroll);
46+
window.addEventListener("resize", this.handleResize);
47+
this.handleResize();
48+
}
49+
50+
componentWillUnmount() {
51+
window.removeEventListener("scroll", this.handleScroll);
52+
window.removeEventListener("resize", this.handleResize);
53+
}
54+
455
render() {
556
return (
57+
this.state.isVisible
58+
&&
659
<a id="mlh-trust-badge"
760
style={{display:"block",maxWidth:"100px",minWidth:"60px",position:"fixed",right:"50px",top:0,width:"10%", zIndex:10000}}
861
href="https://mlh.io/seasons/2022/events?utm_source=na-hackathon&utm_medium=TrustBadge&utm_campaign=2022-season&utm_content=white">

src/components/Dashboard/Forms/UserProfileForm/ProfileCards/Register.jsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class Register extends Component {
1717
user: this.props.user,
1818
checkedState1: (this.props.user.registration_status !== "unregistered"),
1919
checkedState2: (this.props.user.registration_status !== "unregistered"),
20+
checkedState3: (this.props.user.registration_status !== "unregistered"),
2021
message: null
2122
});
2223
}
@@ -119,6 +120,9 @@ class Register extends Component {
119120
if (this.state.checkedState2) {
120121
mlhnotices.push("mlh2");
121122
}
123+
if (this.state.checkedState3) {
124+
mlhnotices.push("mlh3");
125+
}
122126
let model = { mlhnotices };
123127
let message = null;
124128
if (this.state.message) {
@@ -137,7 +141,7 @@ class Register extends Component {
137141
className="custom-av-checkbox"
138142
label={<h4>MLH Notices</h4>}
139143
required
140-
validate={{ required: { value: true, errorMessage: "Please review these MLH guidelines" }, min: { value: 2, errorMessage: "You must select both of these checkboxes" } }}>
144+
validate={{ required: { value: true, errorMessage: "Please review these MLH guidelines" }, min: { value: 3, errorMessage: "You must select all of the checkboxes" } }}>
141145
<AvCheckbox name="mlh1"
142146
customInput
143147
onChange={() => { this.setState({ checkedState1: !this.state.checkedState1 }); }}
@@ -151,14 +155,19 @@ class Register extends Component {
151155
label={<p>I authorize you to share my application/registration information for event administration, ranking, MLH administration, pre- and post-event informational e-mails, and occasional messages about hackathons in-line with the{" "}
152156
<a href="https://mlh.io/privacy"
153157
rel="noopener noreferrer"
154-
target="_blank">MLH Privacy Policy</a>. Further, I agree to the terms of both the{" "}
158+
target="_blank">MLH Privacy Policy</a>.</p>}
159+
value={"mlh2"} />
160+
<AvCheckbox name="mlh3"
161+
customInput
162+
onChange={() => { this.setState({ checkedState2: !this.state.checkedState2 }); }}
163+
label={<p> Further, I agree to the terms of both the{" "}
155164
<a href="https://github.com/MLH/mlh-policies/blob/master/prize-terms-and-conditions/contest-terms.md"
156165
rel="noopener noreferrer"
157166
target="_blank">MLH Contest Terms and Conditions</a> and the{" "}
158167
<a href="https://mlh.io/privacy"
159168
rel="noopener noreferrer"
160169
target="_blank">MLH Privacy Policy</a>. NOTE: Proof of vaccination or a negative test result 1-2 days before the event must be shown for entry.</p>}
161-
value={"mlh2"} />
170+
value={"mlh3"} />
162171
</AvCheckboxGroup>
163172
<h4>Registration</h4>
164173
<p>After filling out all required parts in About and Education, please make sure you have uploaded a filled and signed{" "}

src/components/Landing/Sections/Faqs.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ const FAQTextOne = {
4343
"Yes! We'll release more information about prizes as the event draws near.",
4444
},
4545
six: {
46+
title: "Will there be a mask mandate?",
47+
text: "Yes, HackRU will have a mask mandate throughout the duration of the event."
48+
},
49+
seven: {
4650
title: "I have more questions!",
4751
text: [
4852
<span key={1}>

0 commit comments

Comments
 (0)