Skip to content

Commit 44c24b9

Browse files
authored
Merge pull request #158 from risk-first/movement
Fixing share link
2 parents e51f184 + 42bde8e commit 44c24b9

File tree

1 file changed

+92
-90
lines changed

1 file changed

+92
-90
lines changed

src/components/Movement/index.js

Lines changed: 92 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ export default function Movement() {
4141
}
4242
};
4343

44-
const shareLinks = {
45-
linkedin: 'https://www.linkedin.com/sharing/share-offsite/?url=' + encodeURIComponent(window.location.href),
46-
twitter: 'https://twitter.com/intent/tweet?url=' + encodeURIComponent(window.location.href) + '&text=' + encodeURIComponent('Check out Risk-First Software Development - a new way of thinking about how software really gets built!'),
47-
facebook: 'https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(window.location.href)
48-
};
4944

5045
if (isSubmitted) {
5146
return (
@@ -71,99 +66,106 @@ export default function Movement() {
7166
return (
7267
<section className={styles.movementSection}>
7368
<BrowserOnly>
74-
{() => (
69+
{() => {
70+
const shareLinks = {
71+
linkedin: 'https://www.linkedin.com/sharing/share-offsite/?url=' + encodeURIComponent(window.location.href),
72+
twitter: 'https://twitter.com/intent/tweet?url=' + encodeURIComponent(window.location.href) + '&text=' + encodeURIComponent('Check out Risk-First Software Development - a new way of thinking about how software really gets built!'),
73+
facebook: 'https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(window.location.href)
74+
};
7575

76-
<div className={styles.container}>
77-
<div className={styles.content}>
78-
<h2 className={styles.title}>Let's Create a Movement 🚀</h2>
79-
<div className={styles.text}>
80-
<p>
81-
Risk-First is more than just a book — it's a different way to think about how software really gets built.
82-
And movements only grow when people share them.
83-
</p>
84-
<p>
85-
Here's how you can get in on the ground floor of a new movement and help spread the word and get rewarded:
86-
</p>
87-
<ol className={styles.steps}>
88-
<li>Share this page on LinkedIn, X (Twitter), or your favorite platform.</li>
89-
<li>Fill out this quick form with your email address and a link to your post.</li>
90-
<li>Get rewarded — I'll send you a special discount code to grab a <strong>free</strong> digital copy of Risk-First Software Development, Second Edition (Beta).</li>
91-
</ol>
92-
</div>
76+
return (
77+
<div className={styles.container}>
78+
<div className={styles.content}>
79+
<h2 className={styles.title}>Let's Create a Movement 🚀</h2>
80+
<div className={styles.text}>
81+
<p>
82+
Risk-First is more than just a book — it's a different way to think about how software really gets built.
83+
And movements only grow when people share them.
84+
</p>
85+
<p>
86+
Here's how you can get in on the ground floor of a new movement and help spread the word and get rewarded:
87+
</p>
88+
<ol className={styles.steps}>
89+
<li>Share this page on LinkedIn, X (Twitter), or your favorite platform.</li>
90+
<li>Fill out this quick form with your email address and a link to your post.</li>
91+
<li>Get rewarded — I'll send you a special discount code to grab a <strong>free</strong> digital copy of Risk-First Software Development, Second Edition (Beta).</li>
92+
</ol>
93+
</div>
9394

94-
<div className={styles.shareButtons}>
95-
<a
96-
href={shareLinks.linkedin}
97-
target="_blank"
98-
rel="noopener noreferrer"
99-
className={styles.shareButton}
100-
>
101-
Share on LinkedIn
102-
</a>
103-
<a
104-
href={shareLinks.twitter}
105-
target="_blank"
106-
rel="noopener noreferrer"
107-
className={styles.shareButton}
108-
>
109-
Share on X (Twitter)
110-
</a>
111-
<a
112-
href={shareLinks.facebook}
113-
target="_blank"
114-
rel="noopener noreferrer"
115-
className={styles.shareButton}
116-
>
117-
Share on Facebook
118-
</a>
119-
</div>
95+
<div className={styles.shareButtons}>
96+
<a
97+
href={shareLinks.linkedin}
98+
target="_blank"
99+
rel="noopener noreferrer"
100+
className={styles.shareButton}
101+
>
102+
Share on LinkedIn
103+
</a>
104+
<a
105+
href={shareLinks.twitter}
106+
target="_blank"
107+
rel="noopener noreferrer"
108+
className={styles.shareButton}
109+
>
110+
Share on X (Twitter)
111+
</a>
112+
<a
113+
href={shareLinks.facebook}
114+
target="_blank"
115+
rel="noopener noreferrer"
116+
className={styles.shareButton}
117+
>
118+
Share on Facebook
119+
</a>
120+
</div>
120121

121-
<form className={styles.form} onSubmit={handleSubmit}>
122-
<h3 className={styles.formTitle}>👉 Share the Page & Claim Your Free Copy</h3>
122+
<form className={styles.form} onSubmit={handleSubmit}>
123+
<h3 className={styles.formTitle}>👉 Share the Page & Claim Your Free Copy</h3>
123124

124-
<div className={styles.formGroup}>
125-
<label htmlFor="email" className={styles.label}>
126-
Email Address *
127-
</label>
128-
<input
129-
type="email"
130-
id="email"
131-
name="email"
132-
value={formData.email}
133-
onChange={handleInputChange}
134-
className={styles.input}
135-
required
136-
placeholder="[email protected]"
137-
/>
138-
</div>
125+
<div className={styles.formGroup}>
126+
<label htmlFor="email" className={styles.label}>
127+
Email Address *
128+
</label>
129+
<input
130+
type="email"
131+
id="email"
132+
name="email"
133+
value={formData.email}
134+
onChange={handleInputChange}
135+
className={styles.input}
136+
required
137+
placeholder="[email protected]"
138+
/>
139+
</div>
139140

140-
<div className={styles.formGroup}>
141-
<label htmlFor="socialLink" className={styles.label}>
142-
Link to Your Post *
143-
</label>
144-
<input
145-
type="url"
146-
id="socialLink"
147-
name="socialLink"
148-
value={formData.socialLink}
149-
onChange={handleInputChange}
150-
className={styles.input}
151-
required
152-
placeholder="https://linkedin.com/posts/..."
153-
/>
154-
</div>
141+
<div className={styles.formGroup}>
142+
<label htmlFor="socialLink" className={styles.label}>
143+
Link to Your Post *
144+
</label>
145+
<input
146+
type="url"
147+
id="socialLink"
148+
name="socialLink"
149+
value={formData.socialLink}
150+
onChange={handleInputChange}
151+
className={styles.input}
152+
required
153+
placeholder="https://linkedin.com/posts/..."
154+
/>
155+
</div>
155156

156-
<button type="submit" className={styles.submitButton}>
157-
Claim My Discount Code
158-
</button>
159-
</form>
157+
<button type="submit" className={styles.submitButton}>
158+
Claim My Discount Code
159+
</button>
160+
</form>
160161

161-
<p className={styles.footerText}>
162-
Together, we can build a community that puts risk where it belongs: at the center of how we understand software.
163-
</p>
162+
<p className={styles.footerText}>
163+
Together, we can build a community that puts risk where it belongs: at the center of how we understand software.
164+
</p>
165+
</div>
164166
</div>
165-
</div>
166-
)}
167+
);
168+
}}
167169
</BrowserOnly>
168170
</section >
169171
);

0 commit comments

Comments
 (0)