@@ -18,83 +18,90 @@ class Landing extends Component {
18
18
19
19
renderBlogs ( ) {
20
20
return map ( this . props . blogs , ( blog ) => {
21
- return (
22
- < div
23
- key = { v4 ( ) }
24
- className = "post-item isotope-item clearfix post-45 post type-post status-publish format-standard has-post-thumbnail hentry category-adventures"
25
- >
26
- < div className = "date_label" > { blog . createdAt } </ div >
27
- < div style = { { cursor : 'pointer' } } className = "button-love" >
28
- < span onClick = { ( ) => this . clickHandler ( blog . _id ) } className = "mfn-love " data-id = { 45 } >
29
- < span className = "icons-wrapper" >
30
- < i className = "icon-heart-empty-fa" />
31
- < i className = "icon-heart-fa" />
32
- </ span >
33
- < span className = "label" > { blog . likesCount } </ span >
34
- </ span >
35
- </ div >
36
- < Link to = { `/blogs/${ blog . _id } ` } >
37
- < div className = "image_frame post-photo-wrapper scale-with-grid images_only" >
38
- < div className = "image_wrapper" >
39
- < div className = "mask" />
40
- < img
41
- src = { `${ blog . imageUrl } ` }
42
- className = "scale-with-grid wp-post-image"
43
- alt = ""
44
- />
45
- </ div >
46
- </ div >
47
- </ Link >
48
-
49
- < Link to = { `/blogs/${ blog . _id } ` } >
50
-
21
+ try {
22
+ return (
51
23
< div
52
- className = "post-desc-wrapper bg-dark"
53
- style = { { backgroundColor : "#505b4e" } }
24
+ key = { v4 ( ) }
25
+ className = "post-item isotope-item clearfix post-45 post type-post status-publish format-standard has-post-thumbnail hentry category-adventures"
54
26
>
55
- < div className = "post-desc" >
56
- < div className = "post-head" >
57
- < div className = "post-meta clearfix" >
58
- < div className = "category" >
59
- < span className = "cat-btn" >
60
- Categories < i className = "icon-down-dir" />
61
- </ span >
62
- < div className = "cat-wrapper" >
63
- < ul className = "post-categories" >
64
- < li >
65
- < span >
66
- Public
67
- </ span >
68
- </ li >
69
- </ ul >
27
+ < div className = "date_label" > { blog . createdAt } </ div >
28
+ < div style = { { cursor : 'pointer' } } className = "button-love" >
29
+ < span onClick = { ( ) => this . clickHandler ( blog . _id ) } className = "mfn-love " data-id = { 45 } >
30
+ < span className = "icons-wrapper" >
31
+ < i className = "icon-heart-empty-fa" />
32
+ < i className = "icon-heart-fa" />
33
+ </ span >
34
+ < span className = "label" > { blog . likesCount } </ span >
35
+ </ span >
36
+ </ div >
37
+ < Link to = { `/blogs/${ blog . _id } ` } >
38
+ < div className = "image_frame post-photo-wrapper scale-with-grid images_only" >
39
+ < div className = "image_wrapper" >
40
+ < div className = "mask" />
41
+ < img
42
+ src = { `${ blog . imageUrl } ` }
43
+ className = "scale-with-grid wp-post-image"
44
+ alt = ""
45
+ />
46
+ </ div >
47
+ </ div >
48
+ </ Link >
49
+
50
+ < Link to = { `/blogs/${ blog . _id } ` } >
51
+
52
+ < div
53
+ className = "post-desc-wrapper bg-dark"
54
+ style = { { backgroundColor : "#505b4e" } }
55
+ >
56
+ < div className = "post-desc" >
57
+ < div className = "post-head" >
58
+ < div className = "post-meta clearfix" >
59
+ < div className = "category" >
60
+ < span className = "cat-btn" >
61
+ Categories < i className = "icon-down-dir" />
62
+ </ span >
63
+ < div className = "cat-wrapper" >
64
+ < ul className = "post-categories" >
65
+ < li >
66
+ < span >
67
+ Public
68
+ </ span >
69
+ </ li >
70
+ </ ul >
71
+ </ div >
70
72
</ div >
71
73
</ div >
72
74
</ div >
73
- </ div >
74
- < div className = "post -title" >
75
- < h2 className = "entry- title" >
76
- { blog . title }
77
- </ h2 >
78
- </ div >
79
- < div className = "post-excerpt" > { blog . content } </ div >
80
- < div className = "post-footer " >
81
- < span className = "vcard author post-author" >
82
- < img
83
- alt = { blog . _user . displayName }
84
- src = { ` ${ blog . _user . photoUrl } ` }
85
- className = "post-date updated" referrerPolicy = "no-referrer" width = { '40px' }
86
- /> By { blog . _user . displayName } ,
87
-
88
- On
89
- { new Date ( blog . createdAt ) . toLocaleDateString ( 'en-us' , { weekday : "long" , year : "numeric" , month : "short" , day : "numeric" } ) }
90
- </ span >
75
+ < div className = "post-title" >
76
+ < h2 className = "entry -title" >
77
+ { blog . title }
78
+ </ h2 >
79
+ </ div >
80
+ < div className = "post-excerpt" > { blog . content } </ div >
81
+ < div className = "post-footer" >
82
+ < span className = "vcard author post-author " >
83
+ < img
84
+ alt = { blog . _user . displayName }
85
+ src = { ` ${ blog . _user . photoUrl } ` }
86
+ className = "post-date updated" referrerPolicy = "no-referrer" width = { '40px' }
87
+ /> By { blog . _user . displayName } ,
88
+
89
+ On
90
+ { new Date ( blog . createdAt ) . toLocaleDateString ( 'en-us' , { weekday : "long" , year : "numeric" , month : "short" , day : "numeric" } ) }
91
+ </ span >
92
+ </ div >
91
93
</ div >
92
94
</ div >
95
+ </ Link >
96
+
93
97
</ div >
94
- </ Link >
98
+ ) ;
99
+ } catch ( error ) {
100
+ return (
101
+ "You are seeing cached data please reload"
102
+ ) ;
103
+ }
95
104
96
- </ div >
97
- ) ;
98
105
} ) ;
99
106
}
100
107
0 commit comments