• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hasadna / open-bus-map-search / 14265075200

04 Apr 2025 12:13PM UTC coverage: 80.203% (-0.5%) from 80.73%
14265075200

Pull #1074

github

web-flow
Merge d385339e8 into c8b443278
Pull Request #1074: fix: Bug Horizontal scroll

356 of 510 branches covered (69.8%)

Branch coverage included in aggregate %.

0 of 4 new or added lines in 2 files covered. (0.0%)

6 existing lines in 1 file now uncovered.

985 of 1162 relevant lines covered (84.77%)

87589.73 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.0
/src/layout/sidebar/SideBar.tsx
1
import './sidebar.scss'
2
import { Drawer, Layout } from 'antd'
3
import { useContext, useState } from 'react'
4
import { Link } from 'react-router-dom'
5
import { useTranslation } from 'react-i18next'
6
import { LayoutContextInterface, LayoutCtx } from '../LayoutContext'
7
import Menu from './menu/Menu'
8
import { Logo } from './logo'
9
import { PAGES } from 'src/routes'
10
const { Sider } = Layout
120✔
11

12
const CollapsedLogo = () => <h1 className={'sidebar-logo-collapsed'}>🚌</h1>
120✔
13

14
export default function SideBar() {
120✔
15
  const { i18n } = useTranslation()
1,616✔
16
  const { drawerOpen, setDrawerOpen } = useContext<LayoutContextInterface>(LayoutCtx)
1,616✔
17
  const [collapsed, setCollapsed] = useState(false)
1,616✔
18

19
  const isRtl = i18n.language === 'he'
1,616✔
20

21
  return (
22
    <>
23
      <Drawer
24
        placement="right"
25
        mask
26
        width={280}
27
        onClose={() => setDrawerOpen(false)}
×
28
        open={drawerOpen}
29
        className="hideOnDesktop"
30
        bodyStyle={{ padding: '0' }}>
31
        <Logo />
32
        <div className="sidebar-divider"></div>
33
        <Menu />
34
        <div className="sidebar-divider"></div>
35
      </Drawer>
36
      <Sider
37
        theme="light"
38
        breakpoint="lg"
39
        collapsedWidth={60}
40
        width={250}
41
        collapsible
42
        collapsed={collapsed}
43
        reverseArrow={isRtl}
NEW
44
        onCollapse={(value: boolean) => setCollapsed(value)}
×
45
        className="hideOnMobile">
46
        <Link to={PAGES[0].path} replace>
47
          {collapsed ? <CollapsedLogo /> : <Logo />}
×
48
        </Link>
49
        <div className="sidebar-divider"></div>
50
        <Menu />
51
        <div className="sidebar-divider"></div>
52
      </Sider>
53
    </>
54
  )
55
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc