feat: 💨
This commit is contained in:
parent
3ae5a74395
commit
ff9066ed1c
3 changed files with 46 additions and 30 deletions
22
src/components/PinnedNoteCard/index.tsx
Normal file
22
src/components/PinnedNoteCard/index.tsx
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { useFetchEvent } from '@/hooks'
|
||||
import NoteCard, { NoteCardLoadingSkeleton } from '../NoteCard'
|
||||
|
||||
export default function PinnedNoteCard({
|
||||
eventId,
|
||||
className
|
||||
}: {
|
||||
eventId: string
|
||||
className?: string
|
||||
}) {
|
||||
const { event, isFetching } = useFetchEvent(eventId)
|
||||
|
||||
if (isFetching) {
|
||||
return <NoteCardLoadingSkeleton />
|
||||
}
|
||||
|
||||
if (!event) {
|
||||
return null
|
||||
}
|
||||
|
||||
return <NoteCard event={event} className={className} pinned />
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue