import './Comment.scss' import { Icon } from '../_shared/Icon' import { AuthorCard } from '../Author/Card' import { Show, createMemo } from 'solid-js' import { clsx } from 'clsx' import type { Author, Reaction as Point } from '../../graphql/types.gen' import { t } from '../../utils/intl' // import { createReaction, updateReaction, deleteReaction } from '../../stores/zine/reactions' import MD from './MD' import { deleteReaction } from '../../stores/zine/reactions' export default (props: { level?: number comment: Partial canEdit?: boolean compact?: boolean }) => { const comment = createMemo(() => props.comment) const body = createMemo(() => comment().body.toString().trim()) const remove = () => { if (comment()?.id) { console.log('[comment] removing', comment().id) deleteReaction(comment().id) } } return (
} >
{comment()?.createdAt}
{comment().stat.rating}
{/*FIXME implement edit comment modal*/} {/* showModal('editComment')}*/} {/*>*/} {/* */} {/* {t('Edit')}*/} {/**/} {/*FIXME implement modals */} {/*
) }