@@ -27,7 +27,7 @@ interface NoteListProps {
2727 onReady ?: ( ) => void ;
2828}
2929
30- export default function NoteList < T extends object > ( props : Pick < NoteListProps , "displayOnlyCollections" | "media" | "onReady" > ) {
30+ export default function NoteList ( props : Pick < NoteListProps , "displayOnlyCollections" | "media" | "onReady" > ) {
3131 const { note, noteContext, notePath, ntxId } = useNoteContext ( ) ;
3232 const viewType = useNoteViewType ( note ) ;
3333 const [ enabled , setEnabled ] = useState ( noteContext ?. hasNoteList ( ) ) ;
@@ -37,12 +37,12 @@ export default function NoteList<T extends object>(props: Pick<NoteListProps, "d
3737 return < CustomNoteList viewType = { viewType } note = { note } isEnabled = { ! ! enabled } notePath = { notePath } ntxId = { ntxId } { ...props } />
3838}
3939
40- export function SearchNoteList < T extends object > ( props : Omit < NoteListProps , "isEnabled" > ) {
40+ export function SearchNoteList ( props : Omit < NoteListProps , "isEnabled" | "viewType "> ) {
4141 const viewType = useNoteViewType ( props . note ) ;
4242 return < CustomNoteList { ...props } isEnabled = { true } viewType = { viewType } />
4343}
4444
45- export function CustomNoteList < T extends object > ( { note, viewType, isEnabled : shouldEnable , notePath, highlightedTokens, displayOnlyCollections, ntxId, onReady, ...restProps } : NoteListProps ) {
45+ export function CustomNoteList ( { note, viewType, isEnabled : shouldEnable , notePath, highlightedTokens, displayOnlyCollections, ntxId, onReady, ...restProps } : NoteListProps ) {
4646 const widgetRef = useRef < HTMLDivElement > ( null ) ;
4747 const noteIds = useNoteIds ( shouldEnable ? note : null , viewType , ntxId ) ;
4848 const isFullHeight = ( viewType && viewType !== "list" && viewType !== "grid" ) ;
@@ -119,7 +119,7 @@ function getComponentByViewType(viewType: ViewTypeOptions, props: ViewModeProps<
119119 }
120120}
121121
122- function useNoteViewType ( note ?: FNote | null ) : ViewTypeOptions | undefined {
122+ export function useNoteViewType ( note ?: FNote | null ) : ViewTypeOptions | undefined {
123123 const [ viewType ] = useNoteLabel ( note , "viewType" ) ;
124124
125125 if ( ! note ) {
0 commit comments