import Link from 'next/link' import styles from './item.module.css' import { timeSince } from '../lib/time' import UpVote from './upvote' export default function Item ({ item, rank, children }) { return ( <> {rank ? (
{rank}
) :
}
{item.title} {item.url && = 10 ? null : 'nofollow'}> {item.url.replace(/(^https?:|^)\/\//, '')} }
{item.sats} sats \ {item.boost} boost \ {item.ncomments} comments \ @{item.user.name} {timeSince(new Date(item.createdAt))}
{children && (
{children}
)} ) } export function ItemSkeleton ({ rank, children }) { return ( <> {rank &&
{rank}
}
{children && (
{children}
)} ) }