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

Function PrivatePost

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

getReadPostButtonTextFunction · 0.90
combinedClicksFunction · 0.90
getReadPostButtonIconFunction · 0.90

Tested by

no test coverage detected