refactor(export): remove scroll back-to-top affordance

This commit is contained in:
tisonhuang
2026-03-05 13:31:13 +08:00
parent 02a6b24517
commit 7e7503035a
2 changed files with 0 additions and 56 deletions

View File

@@ -1275,7 +1275,6 @@ function ExportPage() {
const [hasSeededSnsStats, setHasSeededSnsStats] = useState(false)
const [nowTick, setNowTick] = useState(Date.now())
const [isContactsListAtTop, setIsContactsListAtTop] = useState(true)
const [isPageScrolled, setIsPageScrolled] = useState(false)
const tabCounts = useContactTypeCountsStore(state => state.tabCounts)
const isSharedTabCountsLoading = useContactTypeCountsStore(state => state.isLoading)
const isSharedTabCountsReady = useContactTypeCountsStore(state => state.isReady)
@@ -1596,19 +1595,6 @@ function ExportPage() {
return () => clearInterval(timer)
}, [isExportRoute])
useEffect(() => {
if (!isExportRoute) {
setIsPageScrolled(false)
return
}
const onWindowScroll = () => {
setIsPageScrolled(window.scrollY > 160)
}
onWindowScroll()
window.addEventListener('scroll', onWindowScroll, { passive: true })
return () => window.removeEventListener('scroll', onWindowScroll)
}, [isExportRoute])
useEffect(() => {
if (!isTaskCenterOpen || !expandedPerfTaskId) return
const target = tasks.find(task => task.id === expandedPerfTaskId)
@@ -3810,7 +3796,6 @@ function ExportPage() {
const taskRunningCount = tasks.filter(task => task.status === 'running').length
const taskQueuedCount = tasks.filter(task => task.status === 'queued').length
const hasFilteredContacts = filteredContacts.length > 0
const showBackToTop = isPageScrolled || !isContactsListAtTop
const closeTaskCenter = useCallback(() => {
setIsTaskCenterOpen(false)
setExpandedPerfTaskId(null)
@@ -3923,10 +3908,6 @@ function ExportPage() {
showSessionDetailPanel,
toggleSelectSession
])
const handleBackToTop = useCallback(() => {
contactsVirtuosoRef.current?.scrollToIndex({ index: 0, align: 'start', behavior: 'smooth' })
window.scrollTo({ top: 0, behavior: 'smooth' })
}, [])
const handleContactsListWheelCapture = useCallback((event: WheelEvent<HTMLDivElement>) => {
const deltaY = event.deltaY
if (!deltaY) return
@@ -4563,16 +4544,6 @@ function ExportPage() {
</div>
</div>
{showBackToTop && (
<button
type="button"
className="back-to-top-btn"
onClick={handleBackToTop}
>
</button>
)}
{exportDialog.open && createPortal(
<div className="export-dialog-overlay" onClick={closeExportDialog}>
<div className="export-dialog" role="dialog" aria-modal="true" onClick={(event) => event.stopPropagation()}>