Fix lint on main (#1885)
parent
e1938931e0
commit
bb4ed3cd49
|
@ -269,15 +269,21 @@ interface FeedSectionProps {
|
||||||
}
|
}
|
||||||
const FeedSection = React.forwardRef<SectionRef, FeedSectionProps>(
|
const FeedSection = React.forwardRef<SectionRef, FeedSectionProps>(
|
||||||
function FeedSectionImpl(
|
function FeedSectionImpl(
|
||||||
{feed, onScroll, headerHeight, isScrolledDown, scrollElRef},
|
{
|
||||||
|
feed,
|
||||||
|
onScroll,
|
||||||
|
headerHeight,
|
||||||
|
// isScrolledDown,
|
||||||
|
scrollElRef,
|
||||||
|
},
|
||||||
ref,
|
ref,
|
||||||
) {
|
) {
|
||||||
const hasNew = false //TODO feed.hasNewLatest && !feed.isRefreshing
|
// const hasNew = false //TODO feed.hasNewLatest && !feed.isRefreshing
|
||||||
|
|
||||||
const onScrollToTop = React.useCallback(() => {
|
const onScrollToTop = React.useCallback(() => {
|
||||||
scrollElRef.current?.scrollToOffset({offset: -headerHeight})
|
scrollElRef.current?.scrollToOffset({offset: -headerHeight})
|
||||||
// feed.refresh() TODO
|
// feed.refresh() TODO
|
||||||
}, [feed, scrollElRef, headerHeight])
|
}, [scrollElRef, headerHeight])
|
||||||
React.useImperativeHandle(ref, () => ({
|
React.useImperativeHandle(ref, () => ({
|
||||||
scrollToTop: onScrollToTop,
|
scrollToTop: onScrollToTop,
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Reference in New Issue