You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			17 lines
		
	
	
		
			442 B
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			17 lines
		
	
	
		
			442 B
		
	
	
	
		
			TypeScript
		
	
import { createContext, useContext } from 'react';
 | 
						|
 | 
						|
export type ScrollToLoadedReasons =
 | 
						|
  | 'quote-or-search-result'
 | 
						|
  | 'go-to-bottom'
 | 
						|
  | 'unread-indicator'
 | 
						|
  | 'load-more-top'
 | 
						|
  | 'load-more-bottom';
 | 
						|
 | 
						|
export const ScrollToLoadedMessageContext = createContext(
 | 
						|
  (_loadedMessageIdToScrollTo: string, _reason: ScrollToLoadedReasons) => {}
 | 
						|
);
 | 
						|
 | 
						|
export function useScrollToLoadedMessage() {
 | 
						|
  return useContext(ScrollToLoadedMessageContext);
 | 
						|
}
 |