Skip to content

Commit 801e85f

Browse files
Merge pull request #13 from CameraKit/develop
Release 2.0.2
2 parents d19400c + 3b256b9 commit 801e85f

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

kit/entry/server.js

+5
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@ const app = new Koa()
283283
const total = end.microseconds + (end.milliseconds * 1e3) + (end.seconds * 1e6);
284284
ctx.set('Response-Time', `${total / 1e3}ms`);
285285
})
286+
287+
.use(async (ctx, next) => {
288+
await next();
289+
ctx.set('Access-Control-Allow-Origin', '*');
290+
})
286291

287292
// Create a new Apollo client and Redux store per request. This will be
288293
// stored on the `ctx` object, making it available for the React handler or

src/components/public/menu/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ const Menu = props => (
1212
<li className={styles.item}>
1313
<a className={`heading--large ${styles.link}`} href="http://docs.camerakit.website/#/">Documentation</a>
1414
</li>
15+
<li className={styles.item}>
16+
<a className={`heading--large ${styles.link}`} href="https://github.com/CameraKit/jpegkit-android">JPEGKit</a>
17+
</li>
1518
<li className={styles.item}>
1619
<a className={`heading--large ${styles.link}`} href="https://github.com/CameraKit/camerakit-android">Github</a>
1720
</li>

src/components/public/news/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class News extends React.Component {
1616
}
1717

1818
componentDidMount() {
19-
Feed.load('https://cors-anywhere.herokuapp.com/https://medium.com/feed/@camerakit', (err, rss) => {
19+
Feed.load('https://cors-anywhere.herokuapp.com/https://medium.com/feed/camerakit', (err, rss) => {
2020
if (err) return console.log(err);
2121
this.setState({ items: rss.items });
2222
});
@@ -25,8 +25,8 @@ class News extends React.Component {
2525
render() {
2626
return (
2727
<section className={styles.news}>
28-
<div className='container'>
29-
<h2 className='heading--small'>
28+
<div className="container">
29+
<h2 className="heading--small">
3030
Recent News
3131
</h2>
3232
{this.state.items.length > 0 ?

src/components/public/news/news-item.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import moment from 'moment';
44

55
import styles from './news-item.scss';
66

7-
function formatDate(date){
7+
function formatDate(date) {
88
return moment(Number(date)).format('MMMM D YYYY');
99
}
1010

src/components/public/subscribe/index.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,27 @@ import styles from './subscribe.scss';
55
const url = 'https://wonderkiln.us12.list-manage.com/subscribe/post?u=45b5c2055f100d913f074055b&amp;id=ec9df2ad9a';
66

77
class Subscribe extends React.Component {
8-
render () {
8+
render() {
99
return (
1010
<MailchimpSubscribe
1111
url={url}
1212
render={({ subscribe, status, message }) => (
1313
<div className={styles.subscribe}>
1414
<h2 className="heading--small">Stay Up To Date</h2>
1515
<p className={styles.paragraph}>We sometimes send out important updates concerning CameraKit. Provide your email if you are interested in receiving emails from us.</p>
16-
<form className={styles.form}
16+
<form
17+
className={styles.form}
1718
onSubmit={(event, data) => {
1819
event.preventDefault()
19-
subscribe({ email: this.email.value });
20+
subscribe({ EMAIL: this.email.value });
2021
}}>
2122
<div className={styles.inputWrapper}>
22-
<input ref={node => (this.email = node)} name="email" className={styles.input} type="email" required />
23+
<input ref={input => this.email = input} name="email" className={styles.input} type="email" required />
2324
<button className={styles.submit} type="submit">
2425
{status === 'sending' ? 'Sending...' : 'Subscribe'}
2526
</button>
2627
</div>
27-
{(status == 'error' || status == 'success') && <p className={styles.message}>{message}</p>}
28+
{(status === 'error' || status === 'success') && <p className={styles.message}>{message}</p>}
2829
</form>
2930
</div>
3031
)}

0 commit comments

Comments
 (0)