Skip to content

Commit

Permalink
refactor(custom-scroll): inlince scrollbar css & clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mydearxym committed Nov 27, 2023
1 parent e52bedc commit 749e458
Show file tree
Hide file tree
Showing 12 changed files with 678 additions and 1,004 deletions.
1 change: 0 additions & 1 deletion src/containers/tool/Drawer/Content/DesktopView.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FC, useEffect, useRef, memo } from 'react'

import 'overlayscrollbars/styles/overlayscrollbars.css'
import { useOverlayScrollbars } from 'overlayscrollbars-react'

import { DRAWER_SCROLLER } from '@/constant/dom'
Expand Down
1 change: 0 additions & 1 deletion src/widgets/CustomScroller/VerticalScroller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import { FC, useState, Fragment, useCallback, memo } from 'react'
import 'overlayscrollbars/styles/overlayscrollbars.css'

// NOTE: do not use ViewportTracker here, it cause crash
import { Waypoint } from 'react-waypoint'
Expand Down
8 changes: 2 additions & 6 deletions src/widgets/CustomScroller/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FC, ReactNode, memo } from 'react'
import type { TSizeSML } from '@/spec'
import type { TDirection, TScrollDirection } from './spec'

import HorizontalScroller from './HorizontalScroller'
// import HorizontalScroller from './HorizontalScroller'
import VerticalScroller from './VerticalScroller'

export type TProps = {
Expand All @@ -30,11 +30,7 @@ export type TProps = {
}

const CustomScroller: FC<TProps> = ({ children, direction = 'vertical', ...restProps }) => {
return direction === 'vertical' ? (
<VerticalScroller {...restProps}>{children}</VerticalScroller>
) : (
<HorizontalScroller {...restProps}>{children}</HorizontalScroller>
)
return <VerticalScroller {...restProps}>{children}</VerticalScroller>
}

export default memo(CustomScroller)
46 changes: 0 additions & 46 deletions src/widgets/FeedsBar/List.tsx

This file was deleted.

35 changes: 0 additions & 35 deletions src/widgets/FeedsBar/SourceSelector.tsx

This file was deleted.

39 changes: 0 additions & 39 deletions src/widgets/FeedsBar/index.tsx

This file was deleted.

171 changes: 0 additions & 171 deletions src/widgets/FeedsBar/mock.ts

This file was deleted.

54 changes: 0 additions & 54 deletions src/widgets/FeedsBar/styles/index.ts

This file was deleted.

Loading

0 comments on commit 749e458

Please sign in to comment.