fix spacing on mixed items
This commit is contained in:
parent
4d98110282
commit
e8aaf1956e
|
@ -54,7 +54,7 @@ const truncateString = (string = '', maxLength = 140) =>
|
|||
? `${string.substring(0, maxLength)} […]`
|
||||
: string
|
||||
|
||||
export function CommentFlat ({ item, rank, ...props }) {
|
||||
export function CommentFlat ({ item, rank, siblingComments, ...props }) {
|
||||
const router = useRouter()
|
||||
const [href, as] = useMemo(() => {
|
||||
if (item.path.split('.').length > COMMENT_DEPTH_LIMIT + 1) {
|
||||
|
@ -79,7 +79,7 @@ export function CommentFlat ({ item, rank, ...props }) {
|
|||
</div>)
|
||||
: <div />}
|
||||
<div
|
||||
className='clickToContext py-2'
|
||||
className={`clickToContext ${siblingComments ? 'py-3' : 'py-2'}`}
|
||||
onClick={e => {
|
||||
if (ignoreClick(e)) return
|
||||
router.push(href, as)
|
||||
|
|
|
@ -40,7 +40,7 @@ export default function Item ({ item, rank, belowTitle, right, full, children, s
|
|||
{rank}
|
||||
</div>)
|
||||
: <div />}
|
||||
<div className={`${styles.item} ${siblingComments ? 'pt-2' : ''}`}>
|
||||
<div className={`${styles.item} ${siblingComments ? 'pt-3' : ''}`}>
|
||||
{item.position
|
||||
? <Pin width={24} height={24} className={styles.pin} />
|
||||
: item.meDontLike
|
||||
|
|
|
@ -12,7 +12,7 @@ export const getServerSideProps = getGetServerSideProps({
|
|||
|
||||
export default function Index ({ ssrData }) {
|
||||
const router = useRouter()
|
||||
const variables = { ...router.query }
|
||||
const variables = { ...router.query, includeComments: true }
|
||||
|
||||
return (
|
||||
<SearchLayout sub={variables.sub}>
|
||||
|
|
Loading…
Reference in New Issue