mirror of
				https://github.com/usememos/memos.git
				synced 2025-11-01 01:06:04 +08:00 
			
		
		
		
	chore: update memo props
This commit is contained in:
		
							parent
							
								
									425b43b3bb
								
							
						
					
					
						commit
						3822c26e32
					
				
					 4 changed files with 6 additions and 14 deletions
				
			
		|  | @ -25,7 +25,6 @@ import "@/less/memo.less"; | ||||||
| interface Props { | interface Props { | ||||||
|   memo: Memo; |   memo: Memo; | ||||||
|   showVisibility?: boolean; |   showVisibility?: boolean; | ||||||
|   showCommentEntry?: boolean; |  | ||||||
|   lazyRendering?: boolean; |   lazyRendering?: boolean; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -280,13 +279,6 @@ const Memo: React.FC<Props> = (props: Props) => { | ||||||
|             )} |             )} | ||||||
|           </div> |           </div> | ||||||
|         </div> |         </div> | ||||||
|         {memo.parent && props.showCommentEntry && ( |  | ||||||
|           <div> |  | ||||||
|             <Link to={`/m/${memo.parent.id}`}> |  | ||||||
|               <span className="text-xs text-gray-400 opacity-80">This is a comment of #{memo.parent.id}</span> |  | ||||||
|             </Link> |  | ||||||
|           </div> |  | ||||||
|         )} |  | ||||||
|         <MemoContent |         <MemoContent | ||||||
|           content={memo.content} |           content={memo.content} | ||||||
|           onMemoContentClick={handleMemoContentClick} |           onMemoContentClick={handleMemoContentClick} | ||||||
|  |  | ||||||
|  | @ -133,7 +133,7 @@ const MemoList: React.FC = () => { | ||||||
|   return ( |   return ( | ||||||
|     <div className="memo-list-container"> |     <div className="memo-list-container"> | ||||||
|       {sortedMemos.map((memo) => ( |       {sortedMemos.map((memo) => ( | ||||||
|         <Memo key={`${memo.id}-${memo.displayTs}`} memo={memo} lazyRendering showVisibility showCommentEntry /> |         <Memo key={`${memo.id}-${memo.displayTs}`} memo={memo} lazyRendering showVisibility /> | ||||||
|       ))} |       ))} | ||||||
|       {isFetching ? ( |       {isFetching ? ( | ||||||
|         <div className="status-text-container fetching-tip"> |         <div className="status-text-container fetching-tip"> | ||||||
|  |  | ||||||
|  | @ -93,7 +93,7 @@ const Explore = () => { | ||||||
|         <div className="relative w-full h-auto flex flex-col justify-start items-start"> |         <div className="relative w-full h-auto flex flex-col justify-start items-start"> | ||||||
|           <MemoFilter /> |           <MemoFilter /> | ||||||
|           {sortedMemos.map((memo) => { |           {sortedMemos.map((memo) => { | ||||||
|             return <Memo key={`${memo.id}-${memo.displayTs}`} memo={memo} showCommentEntry />; |             return <Memo key={`${memo.id}-${memo.displayTs}`} memo={memo} />; | ||||||
|           })} |           })} | ||||||
|           {isComplete ? ( |           {isComplete ? ( | ||||||
|             sortedMemos.length === 0 && ( |             sortedMemos.length === 0 && ( | ||||||
|  |  | ||||||
|  | @ -119,16 +119,16 @@ const MemoDetail = () => { | ||||||
|                 <span className="text-gray-400 dark:text-gray-400">#{memo.id}</span> |                 <span className="text-gray-400 dark:text-gray-400">#{memo.id}</span> | ||||||
|               </Tooltip> |               </Tooltip> | ||||||
|             </div> |             </div> | ||||||
|  |             <MemoContent content={memo.content} /> | ||||||
|  |             <MemoResourceListView resourceList={memo.resourceList} /> | ||||||
|  |             <MemoRelationListView relationList={referenceRelations} /> | ||||||
|             {memo.parent && ( |             {memo.parent && ( | ||||||
|               <div className="mb-2"> |               <div className="w-full mt-2"> | ||||||
|                 <Link to={`/m/${memo.parent.id}`}> |                 <Link to={`/m/${memo.parent.id}`}> | ||||||
|                   <span className="text-xs text-gray-400 opacity-80">This is a comment of #{memo.parent.id}</span> |                   <span className="text-xs text-gray-400 opacity-80">This is a comment of #{memo.parent.id}</span> | ||||||
|                 </Link> |                 </Link> | ||||||
|               </div> |               </div> | ||||||
|             )} |             )} | ||||||
|             <MemoContent content={memo.content} /> |  | ||||||
|             <MemoResourceListView resourceList={memo.resourceList} /> |  | ||||||
|             <MemoRelationListView relationList={referenceRelations} /> |  | ||||||
|             <div className="w-full mt-4 flex flex-col sm:flex-row justify-start sm:justify-between sm:items-center gap-2"> |             <div className="w-full mt-4 flex flex-col sm:flex-row justify-start sm:justify-between sm:items-center gap-2"> | ||||||
|               <div className="flex flex-row justify-start items-center"> |               <div className="flex flex-row justify-start items-center"> | ||||||
|                 <Link to={`/u/${encodeURIComponent(memo.creatorUsername)}`}> |                 <Link to={`/u/${encodeURIComponent(memo.creatorUsername)}`}> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue