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;
