import { useRouter } from 'next/router' import React from 'react' import { ignoreClick } from '../lib/clicks' import Comment from './comment' import Item from './item' import ItemJob from './item-job' import { ItemsSkeleton } from './items' import styles from './items.module.css' import MoreFooter from './more-footer' export default function MixedItems ({ rank, items, cursor, fetchMore }) { const router = useRouter() return ( <>
{items.map((item, i) => ( {item.parentId ? ( <>
{ if (ignoreClick(e)) { return } router.push({ pathname: '/items/[id]', query: { id: item.root.id, commentId: item.id } }, `/items/${item.root.id}`) }} >
) : (item.isJob ? : )} ))}
} /> ) }