import { Loading, Card, Divider, Input, Text, Grid, Spacer } 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) => { const FilenameInput = ({ title }: { title: string }) => 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()} {post.files.length === 1 ? "1 file" : `${post.files.length} files`} {post.files.map((file: any) => { return })}
  • })}
}
) } export default PostList