blob: 6780f8c55464294f248e33ae90ab44b9a99ede26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import React from 'react';
import {PostType, UserType} from '../../types';
import {Post} from '../common';
interface FeedProps {
user: UserType;
}
const Feed: React.FC<FeedProps> = ({user}) => {
const posts: Array<PostType> = [];
const dummyPost: PostType = {
owner: user,
};
for (let i = 0; i < 20; i++) {
posts.push(dummyPost);
}
return (
<>
{posts.map((post, index) => (
<Post key={index} post={post} />
))}
</>
);
};
export default Feed;
|