import { Loading, Card, Divider, Input, Text } from "@geist-ui/core" import Preview from "../preview" import ShiftBy from "../shift-by" import VisibilityBadge from "../visibility-badge" import Link from '../Link' import styles from './post-list.module.css' type Props = { posts: any error: any } const PostList = ({ posts, error }: Props) => { return (
{error && Failed to load.} {!posts && } {posts?.length === 0 && You have no posts. Create one here.} { posts?.length > 0 &&
    {posts.map((post: any) => { return
  • {post.title} {new Date(post.createdAt).toLocaleDateString()}
  • })}
}
) } export default PostList