Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a1f2c2f

Browse files
claudeglrodasz
authored andcommitted
Remove Mailchimp newsletter subscription integration
Removes the subscribe API endpoint, Mailchimp config, dependency, and related frontend code that caused the missing secret error. https://claude.ai/code/session_0152cStkB34vWBut4eD4nrtf
1 parent 973d9fd commit a1f2c2f

7 files changed

Lines changed: 91 additions & 321 deletions

File tree

‎.env.example‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# GOOGLE ANALYTICS
22
GOOGLE_ANALYTICS_ID=UX-666666666-6
33

4-
# MAILCHIMP
5-
MAILCHIMP_API_KEY=46b2e2b9bd77f2a3bc7cdd089db541ec-us5
6-
MAILCHIMP_AUDIENCE_ID=985ee1577a
7-
84
# WORDPRESS
95
WP_CONSUMER_KEY=ck_a30e03b3c45a52a72d1f723f23ae7e5c3bc7d53e
106
WP_CONSUMER_SECRET=cs_819d7463bb78f1421f65c4d5070e65404f7e6413

‎components/organisms/Newsletter.js‎

Lines changed: 75 additions & 190 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import PropTypes from 'prop-types'
21
import Link from 'next/link'
32

43
import Button from '../atoms/Button'
@@ -7,206 +6,92 @@ import Heading from '../atoms/Heading'
76
import Subtitle from '../atoms/Subtitle'
87

98
import { choices, decisions } from '../../utils/designTokens'
10-
import Paragraph from '../atoms/Paragraph'
11-
import {
12-
links,
13-
conferenceDate,
14-
conferenceStartTime
15-
} from '../../utils/constants'
16-
17-
const Newsletter = ({ name, email, handleSubmit, handleChange, isLoading }) => {
18-
const isHappening =
19-
new Date(`${conferenceDate}T${conferenceStartTime}`) <= Date.now()
20-
21-
return (
22-
<section id="newsletter" className="newsletter">
23-
<Container>
24-
<div className="description">
25-
<Heading size={1} isInverted>
26-
The CSS Conf Colombia 2021
27-
</Heading>
28-
<Subtitle size={1} isInverted withMargin>
29-
is over, but you can watch it again 🎉
30-
</Subtitle>
31-
{isHappening && (
32-
<Link href={links.RECORDING}>
33-
<a>
34-
<Button withMargin>
35-
<Heading size={3} isInverted>
36-
Watch the recording
37-
</Heading>
38-
</Button>
39-
</a>
40-
</Link>
41-
)}
42-
</div>
43-
{!isHappening && (
44-
<form className="form" onSubmit={handleSubmit}>
45-
<div className="field-group">
46-
<label htmlFor="name">
47-
<Subtitle size={2} isInverted>
48-
Fullname:
49-
</Subtitle>
50-
</label>
51-
<input
52-
name="name"
53-
type="name"
54-
placeholder="Your name"
55-
value={name}
56-
onChange={handleChange('name')}
57-
required
58-
/>
59-
</div>
60-
<div className="field-group">
61-
<label htmlFor="email">
62-
<Subtitle size={2} isInverted>
63-
Email:
64-
</Subtitle>
65-
</label>
66-
<input
67-
name="email"
68-
type="email"
69-
placeholder="Your email"
70-
value={email}
71-
onChange={handleChange('email')}
72-
required
73-
/>
74-
</div>
75-
<Button type="submit" withMargin isDisabled={isLoading}>
9+
import { links } from '../../utils/constants'
10+
11+
const Newsletter = () => (
12+
<section id="newsletter" className="newsletter">
13+
<Container>
14+
<div className="description">
15+
<Heading size={1} isInverted>
16+
The CSS Conf Colombia 2021
17+
</Heading>
18+
<Subtitle size={1} isInverted withMargin>
19+
is over, but you can watch it again 🎉
20+
</Subtitle>
21+
<Link href={links.RECORDING}>
22+
<a>
23+
<Button withMargin>
7624
<Heading size={3} isInverted>
77-
Register for free
25+
Watch the recording
7826
</Heading>
7927
</Button>
80-
<Paragraph size="xs" isInverted>
81-
✅ By registering, you agree with the FAQs and our Code of
82-
Conduct.
83-
</Paragraph>
84-
<Paragraph size="xs" isInverted>
85-
✅ The data will be used just for the event and we are not sharing
86-
it with any third party or sponsor.
87-
</Paragraph>
88-
</form>
89-
)}
90-
<div className="bird"></div>
91-
</Container>
92-
<style jsx>{`
28+
</a>
29+
</Link>
30+
</div>
31+
<div className="bird"></div>
32+
</Container>
33+
<style jsx>{`
34+
.newsletter {
35+
display: flex;
36+
flex-direction: colum;
37+
align-items: center;
38+
position: relative;
39+
background: ${choices.colors.brand.bayofmany};
40+
padding: 120px ${decisions.container.padding} 50px;
41+
overflow: hidden;
42+
}
43+
44+
.newsletter :global(.container) > :global(.heading) {
45+
position: relative;
46+
z-index: 1;
47+
}
48+
49+
.description {
50+
position: relative;
51+
margin-bottom: 50px;
52+
text-align: center;
53+
z-index: 1;
54+
}
55+
56+
.bird {
57+
position: absolute;
58+
display: inline-block;
59+
background-image: url('/static/images/hero-tribal-bird-vector.svg');
60+
background-position: center center;
61+
background-repeat: no-repeat;
62+
background-size: contain;
63+
top: 50%;
64+
left: 0;
65+
transform: translate(40%, -50%);
66+
width: 500px;
67+
height: 500px;
68+
opacity: 0.1;
69+
pointer-events: none;
70+
}
71+
72+
@media (${decisions.queries.screens.desktop}) {
9373
.newsletter {
94-
display: flex;
95-
flex-direction: colum;
96-
align-items: center;
97-
position: relative;
98-
background: ${choices.colors.brand.bayofmany};
99-
padding: 120px ${decisions.container.padding} 50px;
100-
overflow: hidden;
101-
}
102-
103-
.newsletter :global(.container) > :global(.heading) {
104-
position: relative;
105-
z-index: 1;
74+
display: block;
75+
padding-top: 60px;
10676
}
10777
10878
.description {
109-
position: relative;
110-
margin-bottom: 50px;
111-
text-align: center;
112-
z-index: 1;
113-
}
114-
115-
.form {
116-
position: relative;
117-
display: flex;
118-
flex-direction: column;
119-
max-width: ${choices.screens.xs};
120-
z-index: 1;
121-
margin: 0 auto;
122-
}
123-
124-
.form :global(.paragraph) {
125-
margin-top: 20px;
126-
}
127-
128-
.field-group {
129-
margin-bottom: ${choices.spacing[5]};
130-
}
131-
132-
label {
133-
display: inline-block;
134-
margin-bottom: ${choices.spacing[1]};
135-
}
136-
137-
input {
138-
height: 40px;
139-
width: 100%;
140-
border: 1px solid transparent;
141-
margin-right: 20px;
142-
padding: 10px 20px;
143-
font-size: ${choices.fontSize.lg};
144-
color: ${choices.colors.gray[800]};
145-
}
146-
147-
::placeholder {
148-
color: ${choices.colors.gray[400]};
149-
font-size: ${choices.fontSize.lg};
150-
font-weight: 300;
79+
margin-top: 100px;
80+
text-align: left;
15181
}
15282
15383
.bird {
154-
position: absolute;
15584
display: inline-block;
156-
background-image: url('/static/images/hero-tribal-bird-vector.svg');
157-
background-position: center center;
158-
background-repeat: no-repeat;
159-
background-size: contain;
160-
top: 50%;
161-
left: 0;
162-
transform: translate(40%, -50%);
163-
width: 500px;
164-
height: 500px;
165-
opacity: 0.1;
166-
pointer-events: none;
167-
}
168-
169-
@media (${decisions.queries.screens.desktop}) {
170-
.newsletter {
171-
display: block;
172-
padding-top: 60px;
173-
}
174-
175-
.form {
176-
margin 0;
177-
}
178-
179-
.description {
180-
margin-top: 100px;
181-
text-align: left;
182-
}
183-
184-
.bird {
185-
display: inline-block;
186-
bottom: 0;
187-
right: 0;
188-
width: 600px;
189-
height: 600px;
190-
opacity: 1;
191-
transform: translate(120%, -50%);
192-
}
85+
bottom: 0;
86+
right: 0;
87+
width: 600px;
88+
height: 600px;
89+
opacity: 1;
90+
transform: translate(120%, -50%);
19391
}
194-
`}</style>
195-
</section>
196-
)
197-
}
198-
199-
Newsletter.propTypes = {
200-
name: PropTypes.string,
201-
email: PropTypes.string,
202-
handleSubmit: PropTypes.func,
203-
handleChange: PropTypes.func,
204-
isLoading: PropTypes.bool
205-
}
206-
207-
Newsletter.defaultProps = {
208-
handleSubmit: () => {},
209-
handleChange: () => {}
210-
}
92+
}
93+
`}</style>
94+
</section>
95+
)
21196

21297
export default Newsletter

‎config/server.js‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ require('dotenv').config()
22

33
const serverConfig = {
44
isProduction: process.env.NODE_ENV === 'production',
5-
mailchimpApiKey: process.env.MAILCHIMP_API_KEY,
6-
mailchimpAudienceId: process.env.MAILCHIMP_AUDIENCE_ID,
7-
wpConsumerKey: process.env.WP_CONSUMER_KEY,
5+
wpConsumerKey: process.env.WP_CONSUMER_KEY,
86
wpConsumerSecret: process.env.WP_CONSUMER_SECRET,
97
wordpressUrl: process.env.WORDPRESS_URL,
108
ePaycoClientId: process.env.EPAYCO_CLIENT_ID,

‎package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
"dotenv": "^8.2.0",
3333
"isomorphic-unfetch": "^3.0.0",
3434
"lodash": "^4.17.21",
35-
"mailchimp-api-v3": "^1.13.1",
36-
"moment": "^2.24.0",
35+
"moment": "^2.24.0",
3736
"next": "^9.3.2",
3837
"nprogress": "^0.2.0",
3938
"react": "^16.12.0",

‎pages/api/subscribe.js‎

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /