File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed 
components/ArticlePreview Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -55,12 +55,13 @@ const ArticlePreview: NextPage<Props> = ({
5555  showBookmark =  true , 
5656  bookmarkedInitialState =  false , 
5757} )  =>  { 
58+   const  {  data : session  }  =  useSession ( ) ; 
5859  const  [ bookmarked ,  setIsBookmarked ]  =  useState ( bookmarkedInitialState ) ; 
5960  const  howManySavedToShow  =  3 ; 
60-   const  {  data : bookmarksData ,  refetch }  =  api . post . myBookmarks . useQuery ( { 
61-     limit : howManySavedToShow , 
62-   } ) ; 
63-   const   {   data :  session   }   =   useSession ( ) ; 
61+   const  {  data : bookmarksData ,  refetch }  =  api . post . myBookmarks . useQuery ( 
62+     {   limit : howManySavedToShow   } , 
63+      {   enabled :  ! ! session   } 
64+   ) ; 
6465  const  bookmarks  =  bookmarksData ?. bookmarks ; 
6566  const  dateTime  =  Temporal . Instant . from ( new  Date ( date ) . toISOString ( ) ) ; 
6667  const  readableDate  =  dateTime . toLocaleString ( [ "en-IE" ] ,  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments