Skip to content

Commit

Permalink
Merge pull request #13 from CameraKit/develop
Browse files Browse the repository at this point in the history
Release 2.0.2
  • Loading branch information
austinkettner authored Jun 12, 2018
2 parents d19400c + 3b256b9 commit 801e85f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
5 changes: 5 additions & 0 deletions kit/entry/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,11 @@ const app = new Koa()
const total = end.microseconds + (end.milliseconds * 1e3) + (end.seconds * 1e6);
ctx.set('Response-Time', `${total / 1e3}ms`);
})

.use(async (ctx, next) => {
await next();
ctx.set('Access-Control-Allow-Origin', '*');
})

// Create a new Apollo client and Redux store per request. This will be
// stored on the `ctx` object, making it available for the React handler or
Expand Down
3 changes: 3 additions & 0 deletions src/components/public/menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const Menu = props => (
<li className={styles.item}>
<a className={`heading--large ${styles.link}`} href="http://docs.camerakit.website/#/">Documentation</a>
</li>
<li className={styles.item}>
<a className={`heading--large ${styles.link}`} href="https://github.com/CameraKit/jpegkit-android">JPEGKit</a>
</li>
<li className={styles.item}>
<a className={`heading--large ${styles.link}`} href="https://github.com/CameraKit/camerakit-android">Github</a>
</li>
Expand Down
6 changes: 3 additions & 3 deletions src/components/public/news/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class News extends React.Component {
}

componentDidMount() {
Feed.load('https://cors-anywhere.herokuapp.com/https://medium.com/feed/@camerakit', (err, rss) => {
Feed.load('https://cors-anywhere.herokuapp.com/https://medium.com/feed/camerakit', (err, rss) => {
if (err) return console.log(err);
this.setState({ items: rss.items });
});
Expand All @@ -25,8 +25,8 @@ class News extends React.Component {
render() {
return (
<section className={styles.news}>
<div className='container'>
<h2 className='heading--small'>
<div className="container">
<h2 className="heading--small">
Recent News
</h2>
{this.state.items.length > 0 ?
Expand Down
2 changes: 1 addition & 1 deletion src/components/public/news/news-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import moment from 'moment';

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

function formatDate(date){
function formatDate(date) {
return moment(Number(date)).format('MMMM D YYYY');
}

Expand Down
11 changes: 6 additions & 5 deletions src/components/public/subscribe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,27 @@ import styles from './subscribe.scss';
const url = 'https://wonderkiln.us12.list-manage.com/subscribe/post?u=45b5c2055f100d913f074055b&amp;id=ec9df2ad9a';

class Subscribe extends React.Component {
render () {
render() {
return (
<MailchimpSubscribe
url={url}
render={({ subscribe, status, message }) => (
<div className={styles.subscribe}>
<h2 className="heading--small">Stay Up To Date</h2>
<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>
<form className={styles.form}
<form
className={styles.form}
onSubmit={(event, data) => {
event.preventDefault()
subscribe({ email: this.email.value });
subscribe({ EMAIL: this.email.value });
}}>
<div className={styles.inputWrapper}>
<input ref={node => (this.email = node)} name="email" className={styles.input} type="email" required />
<input ref={input => this.email = input} name="email" className={styles.input} type="email" required />
<button className={styles.submit} type="submit">
{status === 'sending' ? 'Sending...' : 'Subscribe'}
</button>
</div>
{(status == 'error' || status == 'success') && <p className={styles.message}>{message}</p>}
{(status === 'error' || status === 'success') && <p className={styles.message}>{message}</p>}
</form>
</div>
)}
Expand Down

0 comments on commit 801e85f

Please sign in to comment.