File tree Expand file tree Collapse file tree 1 file changed +25
-26
lines changed Expand file tree Collapse file tree 1 file changed +25
-26
lines changed Original file line number Diff line number Diff line change @@ -3,43 +3,42 @@ import './App.css';
3
3
import Input from './components/Input'
4
4
import Post from './components/Post'
5
5
6
- function App ( ) {
6
+ const DEFAULT_POSTS = [
7
+ {
8
+ id : 0 ,
9
+ username : 'brian' ,
10
+ text : 'Weather is so good rn'
11
+ } ,
12
+ {
13
+ id : 0 ,
14
+ username : 'brian' ,
15
+ text : 'Weather is bad'
16
+ } ,
17
+ {
18
+ id : 0 ,
19
+ username : 'brian' ,
20
+ text : 'asdklfkjasldkfjalksdjf'
21
+ } ,
22
+ {
23
+ id : 0 ,
24
+ username : 'brian' ,
25
+ text : '2o35462098345709283457'
26
+ } ,
27
+ ]
7
28
8
- const [ count , setCount ] = useState ( 0 )
29
+ function App ( ) {
9
30
10
- const posts = [
11
- {
12
- id : 0 ,
13
- username : 'brian' ,
14
- text : 'Weather is so good rn'
15
- } ,
16
- {
17
- id : 0 ,
18
- username : 'brian' ,
19
- text : 'Weather is bad'
20
- } ,
21
- {
22
- id : 0 ,
23
- username : 'brian' ,
24
- text : 'asdklfkjasldkfjalksdjf'
25
- } ,
26
- {
27
- id : 0 ,
28
- username : 'brian' ,
29
- text : '2o35462098345709283457'
30
- } ,
31
- ]
31
+ const [ posts , setPosts ] = useState ( DEFAULT_POSTS )
32
32
33
33
return (
34
34
< div className = "appContainer" >
35
35
< div className = "nav" >
36
36
< img className = "logo" alt = "logo" src = "https://img.freepik.com/free-vector/twitter-new-2023-x-logo-white-background-vector_1017-45422.jpg?size=338& ext = jpg & ga = GA1 .1 .1700460183 .1712016000 & semt = ais " />
37
37
</ div >
38
- < Input count = { count } setCount = { setCount } />
38
+ < Input />
39
39
< div className = "postContainer" >
40
40
{ posts . map ( ( post ) => < Post post = { post } /> ) }
41
41
</ div >
42
- < p > { count } </ p >
43
42
</ div >
44
43
) ;
45
44
}
You can’t perform that action at this time.
0 commit comments