File tree Expand file tree Collapse file tree 3 files changed +24
-8
lines changed Expand file tree Collapse file tree 3 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 102
102
width : 50px ;
103
103
padding : 8px ;
104
104
}
105
+ .blog__title {
106
+ text-align : center;
107
+ color : # fff ;
108
+ background-color : # 000 ;
109
+ padding : 8px ;
110
+ }
111
+ .blog__posts {
112
+ text-align : left;
113
+ border : 1px solid # 999 ;
114
+ padding : 8px ;
115
+ }
116
+ .post__title {
117
+ color : # 333 ;
118
+ }
105
119
120
+ .post__content {
121
+ color : # 333 ;
122
+ }
106
123
@media only screen and (max-width : 480px ) {
107
124
.container {
108
125
display : block;
Original file line number Diff line number Diff line change 1
1
import { QueryClient , QueryClientProvider , useQuery } from 'react-query' ;
2
2
import { useState } from 'react' ;
3
- import styles from './wp-blog.module.css' ;
4
3
import { useParams } from 'react-router-dom' ;
5
4
6
5
const queryClient = new QueryClient ( ) ;
@@ -54,8 +53,8 @@ function ReactBlog(props) {
54
53
return < div > Loading...</ div > ;
55
54
}
56
55
return (
57
- < div className = { styles . blog__posts } >
58
- < h2 className = { styles . blog__title } > { props . title } </ h2 >
56
+ < div className = " blog__posts" >
57
+ < h2 className = " blog__title" > { props . title } </ h2 >
59
58
< div style = { { textAlign : 'center' } } >
60
59
{ page > 1 && < button onClick = { handlePrevPage } > Newer posts</ button > } { ' ' }
61
60
{ page + 1 <= totalPages && (
@@ -66,13 +65,13 @@ function ReactBlog(props) {
66
65
< div key = { post . id } >
67
66
< h2 >
68
67
< section
69
- className = { styles . post__title }
68
+ className = " post__title"
70
69
dangerouslySetInnerHTML = { { __html : post . title . rendered } }
71
70
/>
72
71
</ h2 >
73
72
74
73
< section
75
- className = { styles . post__content }
74
+ className = " post__content"
76
75
dangerouslySetInnerHTML = { { __html : post . content . rendered } }
77
76
/>
78
77
Original file line number Diff line number Diff line change @@ -22,11 +22,11 @@ export default function ReactBlog(props) {
22
22
23
23
if ( post ) {
24
24
return (
25
- < div className = { styles . blog__posts } >
26
- < h1 className = { styles . blog__title } > { post . title . rendered } </ h1 >
25
+ < div className = " blog__posts" >
26
+ < h1 className = " blog__title" > { post . title . rendered } </ h1 >
27
27
< div key = { post . id } >
28
28
< section
29
- className = { styles . post__content }
29
+ className = " post__content"
30
30
dangerouslySetInnerHTML = { { __html : post . content . rendered } }
31
31
/>
32
32
</ div >
You can’t perform that action at this time.
0 commit comments