How to use the @times-components/user-state.loggedInOrShared function in @times-components/user-state

To help you get started, we’ve selected a few @times-components/user-state examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github newsuk / times-components / packages / article-extras / src / article-extras.web.js View on Github external
relatedArticlesVisible,
  spotAccountId,
  topics
}) => {
  /* Nativo insert Sponsored Articles after the div#sponsored-article element. They are not able to insert directly into that element hence the container div */
  const sponsoredArticles = (
    <div id="sponsored-article-container">
      <div id="sponsored-article">
    </div>
  );
  return (
    
      <div style="{clearingStyle}">
      
      {(savingEnabled || sharingEnabled) &amp;&amp; (
        
          
            {({ showMessage }) =&gt; (
              
                 showMessage("Article link copied")}
                  onSaveToMyArticles={() =&gt; {}}
                  onShareOnEmail={() =&gt; {}}
                  savingEnabled={savingEnabled}
                  sharingEnabled={sharingEnabled}
                /&gt;
              
            )}
          </div></div>
github newsuk / times-components / packages / article-skeleton / src / article-skeleton.web.js View on Github external
&gt;
          
          
            
              
                
              
              
                
                  <header width="{articleWidth}">
                  {savingEnabled || sharingEnabled ? (
                    
                      
                        {({ showMessage }) =&gt; (
                          
                              showMessage("Article link copied")
                            }
                            onSaveToMyArticles={() =&gt; {}}
                            onShareOnEmail={() =&gt; {}}
                            savingEnabled={savingEnabled}
                            sharingEnabled={sharingEnabled}
                          /&gt;
                        )}
                      </header>
github newsuk / times-components / packages / article-main-standard / src / article-topics / index.web.js View on Github external
const ShowTopics = ({ topics }) =&gt; {
  if (topics &amp;&amp; topics.length &gt; 0) {
    return (
      
        <nav>
          
        </nav>
      
    );
  }

  return null;
};