@@ -17,7 +17,7 @@ type SectionListItem = {
1717 tlfType : T . FS . TlfType
1818}
1919
20- const rootRows = [
20+ const rootRows : Array < SectionListItem > = [
2121 {
2222 name : T . FS . TlfType . Private ,
2323 tlfType : T . FS . TlfType . Private ,
@@ -34,10 +34,10 @@ const rootRows = [
3434
3535const getRenderItem =
3636 ( destinationPickerIndex ?: number ) =>
37- ( { item, section} : { item : { name : T . FS . TlfType ; tlfType : T . FS . TlfType } ; section : { key : string } } ) =>
37+ ( { item, section} : { item : SectionListItem ; section : { key : string } } ) =>
3838 section . key === 'section-top' ? (
3939 < WrapRow >
40- < TlfType name = { item . name } destinationPickerIndex = { destinationPickerIndex } />
40+ < TlfType name = { item . name as T . FS . TlfType } destinationPickerIndex = { destinationPickerIndex } />
4141 </ WrapRow >
4242 ) : (
4343 < WrapRow >
@@ -107,7 +107,14 @@ const Root = React.memo(function Root({destinationPickerIndex}: Props) {
107107 const sections = [
108108 ...( destinationPickerIndex
109109 ? [ ] // don't show sfmi banner in destination picker
110- : [ { data : [ ] , key : 'banner-sfmi' , keyExtractor : ( ) => 'banner-sfmi-item' , title : '' } ] ) ,
110+ : [
111+ {
112+ data : new Array < SectionListItem > ( ) ,
113+ key : 'banner-sfmi' ,
114+ keyExtractor : ( ) => 'banner-sfmi-item' ,
115+ title : '' ,
116+ } ,
117+ ] ) ,
111118 {
112119 data : rootRows ,
113120 key : 'section-top' ,
@@ -127,7 +134,7 @@ const Root = React.memo(function Root({destinationPickerIndex}: Props) {
127134 < Kb . BoxGrow >
128135 < Kb . SectionList
129136 sections = { sections }
130- renderItem = { renderItem as any }
137+ renderItem = { renderItem }
131138 renderSectionHeader = { renderSectionHeader }
132139 stickySectionHeadersEnabled = { false }
133140 />
0 commit comments