feat: relay reviews
This commit is contained in:
16
src/components/Note/RelayReview.tsx
Normal file
16
src/components/Note/RelayReview.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { getStarsFromRelayReviewEvent } from '@/lib/event-metadata'
|
||||
import { Event } from 'nostr-tools'
|
||||
import { useMemo } from 'react'
|
||||
import Content from '../Content'
|
||||
import Stars from '../Stars'
|
||||
|
||||
export default function RelayReview({ event, className }: { event: Event; className?: string }) {
|
||||
const stars = useMemo(() => getStarsFromRelayReviewEvent(event), [event])
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
<Stars stars={stars} className="mt-2" />
|
||||
<Content event={event} className="mt-2" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user