@@ -7,6 +7,7 @@ import { FormattedDate } from '@/adapters/client';
77import { app } from '@/adapters/server' ;
88import { CategoriesList } from '@/components/CategoriesList' ;
99import { ContentRenderer } from '@/components/ContentRenderer' ;
10+ import { SocialShare } from '@/components/SocialShare' ;
1011import type { StoryActions , ThemeSettings } from 'theme-settings' ;
1112
1213import { Embargo } from './Embargo' ;
@@ -31,6 +32,7 @@ export async function Story({ actions, sharingOptions, showDate, story, withHead
3132 const nodes = JSON . parse ( story . content ) ;
3233 const [ headerImageDocument , mainDocument ] = pullHeaderImageNode ( nodes , withHeaderImage ) ;
3334 const sharingUrl = links . short || links . newsroom_view ;
35+ const canShare = visibility === 'public' && sharingUrl ;
3436
3537 const headerAlignment = getHeaderAlignment ( nodes ) ;
3638
@@ -59,10 +61,17 @@ export async function Story({ actions, sharingOptions, showDate, story, withHead
5961 < FormattedDate value = { story . published_at } />
6062 </ p >
6163 ) }
64+ { canShare && sharingOptions . share_icons_placement ?. includes ( 'top' ) && (
65+ < SocialShare
66+ socialNetworks = { sharingOptions . sharing_actions }
67+ url = { sharingUrl }
68+ thumbnailUrl = { thumbnailUrl }
69+ />
70+ ) }
6271 </ div >
6372 < ContentRenderer story = { story } nodes = { mainDocument } />
6473 </ article >
65- { visibility === 'public' && sharingUrl && (
74+ { canShare && (
6675 < Share
6776 actions = { actions }
6877 sharingOptions = { sharingOptions }
0 commit comments