Post Card
deso-ui/post-cardFreeBlock
A card for displaying a single post.
Install it
npx shadcn@latest add https://ui.deso.com/r/post-card.jsonSource
1import { ProfilePicture } from './profile-picture';2import { UsernameDisplay } from './username-display';3import { UserPublicKey } from './user-public-key';4import {5 ActionMenu,6 ActionMenuItem,7} from './action-menu';8import { Button } from '../ui/button';9import { MoreHorizontal, UserPlus, Ban, Flag, Repeat, Pin, ExternalLink, ChevronUp, ChevronDown, AtSign, MessageSquare, Gem } from 'lucide-react';10import Link from 'next/link';11import { cn } from '@/lib/utils/deso';12import { useUsername } from '@/hooks/useProfile';13import { PostEngagement } from './post-engagement';14import { useState } from 'react';15import { Timestamp } from './timestamp';16import { PostImage, PostImageActions } from './post-image';17import { PostEmbed } from './post-embed';18import { PostVideo } from './post-video';19import { PostAudio } from './post-audio';20import PostReactions, { Reaction } from './post-reactions';21import { PostShare } from './post-share';22import { PostPoll, PollOption } from './post-poll';23import { PostText } from './post-text';24import { ProfileCard } from './profile-card';2526export interface PostEngagementProps {27 comments: number;28 likes: number;29 reposts: number;30 diamonds: number;31 diamondValue: string;32 quotes: number;33 views: number;34 audioUrl?: string;35 status?: PostStatusProps;36 notification?: PostNotificationProps;37 videoUrl?: string;38 reactions?: Reaction[];39}4041export interface PostStatusProps {42 type: 'repost' | 'pinned';43 reposterPublicKey?: string;44}4546export interface NFTCardProps {47 publicKey: string;48 price: string;49 lastSale: string;50 lastUpdated: string | Date;51 royaltyFee: string;52 ownerPublicKey: string;53}5455export interface PostNotificationProps {56 type: string;57 publicKey: string;58 username: string;59 timestamp: string | Date;60}6162export interface PostQuoteProps {63 publicKey: string;64 postContent: string;65 timestamp: string | Date;66 images?: string[];67 embedUrl?: string;68 quotedPost?: PostQuoteProps;69 status?: PostStatusProps;70 videoUrl?: string;71 audioUrl?: string;72 reactions?: Reaction[];73}7475export interface PostPollInfo {76 options: PollOption[];77 votes: number[];78 totalVotes: number;79 userVotedIndex: number | null;80}8182export interface PostCardProps {83 publicKey: string;84 postContent: string;85 className?: string;86 actions?: PostEngagementProps;87 timestamp: string | Date;88 images?: string[];89 embedUrl?: string;90 quotedPost?: PostQuoteProps;91 status?: PostStatusProps;92 videoUrl?: string;93// … truncated
What it pulls in
Other registry items
Files it writes
More from deso-ui
All 47 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Action Menuaction-menu | deso-ui | Blocks | Free | no deps | |
| Confirmation Dialogconfirmation-dialog | deso-ui | Blocks | Free | no deps | |
| Copy Buttoncopy-button | deso-ui | Blocks | Free | no deps | |
| Editoreditor | deso-ui | Blocks | Free | no deps | |
| Editor Emoji Pickereditor-emoji-picker | deso-ui | Blocks | Free | no deps | |
| Editor Markdowneditor-markdown | deso-ui | Blocks | Free | no deps | |
| Editor Uploadeditor-upload | deso-ui | Blocks | Free | no deps | |
| Feed Listfeed-list | deso-ui | Blocks | Free | no deps |
