File tree Expand file tree Collapse file tree 3 files changed +39
-11
lines changed Expand file tree Collapse file tree 3 files changed +39
-11
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import PropTypes from 'prop-types' ;
3
+ /**
4
+ *
5
+ *
6
+ * @export
7
+ * @class buybutton
8
+ * @augments {React.PureComponent<buybuttonProps> }
9
+ */
10
+ export default class buybutton extends React . PureComponent {
11
+ /**
12
+ * @typedef {object } buybuttonProps
13
+ * @property {array } links
14
+ *
15
+ * @static
16
+ * @memberof buybutton
17
+ */
18
+ static propTypes = {
19
+ links : PropTypes . arrayOf (
20
+ PropTypes . shape ( {
21
+ url : PropTypes . string ,
22
+ title : PropTypes . string ,
23
+ } )
24
+ ) . isRequired ,
25
+ } ;
26
+
27
+ render ( ) {
28
+ return (
29
+ < React . Fragment >
30
+ < button > Buy Now</ button >
31
+ </ React . Fragment >
32
+ ) ;
33
+ }
34
+ }
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from 'react';
2
2
import Item from '../components/Item' ;
3
3
import NavBar from '../components/NavBar' ;
4
4
import links from '../constants/links' ;
5
+ import buybutton from '../components/buybutton' ;
5
6
6
7
/**
7
8
* Home page
@@ -50,7 +51,10 @@ export default class IndexPage extends React.PureComponent {
50
51
< Item id = { id } name = { name } />
51
52
) ) }
52
53
</ ul >
53
- </ main >
54
+ < h2 > Buy Now Button</ h2 >
55
+ < buybutton />
56
+ </ main >
57
+
54
58
</ React . Fragment >
55
59
) ;
56
60
}
You can’t perform that action at this time.
0 commit comments