File tree 5 files changed +18
-9
lines changed
5 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,11 @@ const app = new Koa()
283
283
const total = end . microseconds + ( end . milliseconds * 1e3 ) + ( end . seconds * 1e6 ) ;
284
284
ctx . set ( 'Response-Time' , `${ total / 1e3 } ms` ) ;
285
285
} )
286
+
287
+ . use ( async ( ctx , next ) => {
288
+ await next ( ) ;
289
+ ctx . set ( 'Access-Control-Allow-Origin' , '*' ) ;
290
+ } )
286
291
287
292
// Create a new Apollo client and Redux store per request. This will be
288
293
// stored on the `ctx` object, making it available for the React handler or
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ const Menu = props => (
12
12
< li className = { styles . item } >
13
13
< a className = { `heading--large ${ styles . link } ` } href = "http://docs.camerakit.website/#/" > Documentation</ a >
14
14
</ li >
15
+ < li className = { styles . item } >
16
+ < a className = { `heading--large ${ styles . link } ` } href = "https://github.com/CameraKit/jpegkit-android" > JPEGKit</ a >
17
+ </ li >
15
18
< li className = { styles . item } >
16
19
< a className = { `heading--large ${ styles . link } ` } href = "https://github.com/CameraKit/camerakit-android" > Github</ a >
17
20
</ li >
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class News extends React.Component {
16
16
}
17
17
18
18
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 ) => {
20
20
if ( err ) return console . log ( err ) ;
21
21
this . setState ( { items : rss . items } ) ;
22
22
} ) ;
@@ -25,8 +25,8 @@ class News extends React.Component {
25
25
render ( ) {
26
26
return (
27
27
< section className = { styles . news } >
28
- < div className = ' container' >
29
- < h2 className = ' heading--small' >
28
+ < div className = " container" >
29
+ < h2 className = " heading--small" >
30
30
Recent News
31
31
</ h2 >
32
32
{ this . state . items . length > 0 ?
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import moment from 'moment';
4
4
5
5
import styles from './news-item.scss' ;
6
6
7
- function formatDate ( date ) {
7
+ function formatDate ( date ) {
8
8
return moment ( Number ( date ) ) . format ( 'MMMM D YYYY' ) ;
9
9
}
10
10
Original file line number Diff line number Diff line change @@ -5,26 +5,27 @@ import styles from './subscribe.scss';
5
5
const url = 'https://wonderkiln.us12.list-manage.com/subscribe/post?u=45b5c2055f100d913f074055b&id=ec9df2ad9a' ;
6
6
7
7
class Subscribe extends React . Component {
8
- render ( ) {
8
+ render ( ) {
9
9
return (
10
10
< MailchimpSubscribe
11
11
url = { url }
12
12
render = { ( { subscribe, status, message } ) => (
13
13
< div className = { styles . subscribe } >
14
14
< h2 className = "heading--small" > Stay Up To Date</ h2 >
15
15
< 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 }
17
18
onSubmit = { ( event , data ) => {
18
19
event . preventDefault ( )
19
- subscribe ( { email : this . email . value } ) ;
20
+ subscribe ( { EMAIL : this . email . value } ) ;
20
21
} } >
21
22
< 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 />
23
24
< button className = { styles . submit } type = "submit" >
24
25
{ status === 'sending' ? 'Sending...' : 'Subscribe' }
25
26
</ button >
26
27
</ div >
27
- { ( status == 'error' || status == 'success' ) && < p className = { styles . message } > { message } </ p > }
28
+ { ( status === 'error' || status = == 'success' ) && < p className = { styles . message } > { message } </ p > }
28
29
</ form >
29
30
</ div >
30
31
) }
You can’t perform that action at this time.
0 commit comments