MCPcopy Create free account
hub / github.com/dailydotdev/apps / PrivatePost

Function PrivatePost

packages/shared/src/components/post/SharePostContent.tsx:70–103  ·  view source on GitHub ↗
({
  post,
  openArticle,
  isCompactSpacing,
}: {
  post: Post;
  openArticle: (e: React.MouseEvent) => void;
  isCompactSpacing?: boolean;
})

Source from the content-addressed store, hash-verified

68);
69
70const PrivatePost = ({
71 post,
72 openArticle,
73 isCompactSpacing,
74}: {
75 post: Post;
76 openArticle: (e: React.MouseEvent) => void;
77 isCompactSpacing?: boolean;
78}) => (
79 <SharedLinkContainer className={isCompactSpacing ? 'mb-4 mt-6' : 'mb-5 mt-8'}>
80 <div className="flex flex-row items-center gap-1 px-5 py-4">
81 <div className="flex size-6 items-center justify-center rounded-full bg-surface-secondary">
82 <EarthIcon size={IconSize.Size16} />
83 </div>
84 <Typography
85 className="flex-1"
86 type={TypographyType.Subhead}
87 color={TypographyColor.Secondary}
88 >
89 This post is in a private squad.
90 </Typography>
91 <ReadArticleButton
92 content={getReadPostButtonText(post)}
93 className="w-fit"
94 href={post.commentsPermalink}
95 variant={ButtonVariant.Secondary}
96 title="Go to post"
97 rel="noopener"
98 {...combinedClicks(openArticle)}
99 icon={getReadPostButtonIcon(post)}
100 />
101 </div>
102 </SharedLinkContainer>
103);
104
105export function CommonSharePostContent({
106 sharedPost,

Callers

nothing calls this directly

Calls 3

getReadPostButtonTextFunction · 0.90
combinedClicksFunction · 0.90
getReadPostButtonIconFunction · 0.90

Tested by

no test coverage detected