File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ const modals = (
4444 openCitationModal : false ,
4545 citedPaper : null ,
4646 exportedPaper : null ,
47- showTwitterButton : ! ! action . configObject . show_twitter_button ,
48- showEmailButton : ! ! action . configObject . show_email_button ,
47+ showTwitterButton : showTwitterShare ( action . configObject , action . contextObject ) ,
48+ showEmailButton : showEmailShare ( action . configObject , action . contextObject ) ,
4949 } ;
5050 case "OPEN_EMBED_MODAL" :
5151 return {
@@ -148,3 +148,17 @@ const getSheetID = (config, context) => {
148148
149149 return config . files [ 0 ] . file ;
150150} ;
151+
152+ const showTwitterShare = ( config , context ) => {
153+ if ( config . credit_embed ) {
154+ return false ;
155+ }
156+ return ! ! config . show_twitter_button ;
157+ } ;
158+
159+ const showEmailShare = ( config , context ) => {
160+ if ( config . credit_embed ) {
161+ return false ;
162+ }
163+ return ! ! config . show_email_button ;
164+ } ;
You can’t perform that action at this time.
0 commit comments