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

atlp-rwanda / vikings-ec-fe / 232f6db9-b6f6-42a1-9aa1-11e087e2c026

pending completion
232f6db9-b6f6-42a1-9aa1-11e087e2c026

Pull #31

circleci

munezeroolivierhugue
feat: tract orders
Pull Request #31: #184759929 Implement Tracking Orders

338 of 660 branches covered (51.21%)

Branch coverage included in aggregate %.

64 of 64 new or added lines in 9 files covered. (100.0%)

1442 of 1902 relevant lines covered (75.81%)

21.77 hits per line

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

71.43
/src/components/SubMenu.js
1
import React, { useState } from 'react';
2
import { useDispatch } from 'react-redux';
3
import { useNavigate } from 'react-router-dom';
4
import LogoutIcon from '../../public/images/icons/sidebar/logout.svg';
5
import Button from './forms/Button';
6
import { logout } from '../features/auth/logoutSlice';
7

8
const SubMenu = () => {
54✔
9
  const dispatch = useDispatch();
1✔
10
  const navigate = useNavigate();
1✔
11
  const navItems = [
1✔
12
    {
13
      name: 'Home',
14
      path: '/',
15
    },
16
    { name: 'About', path: '/' },
17
    { name: 'Contact us', path: '/' },
18
  ];
19
  const [showMenu, setShowMenu] = useState(false);
1✔
20

21
  const toggleMenu = () => {
1✔
22
    setShowMenu(!showMenu);
×
23
  };
24

25
  const menuItems = navItems.map((navItem) => (
1✔
26
    <li key={navItem.name}>
3✔
27
      <a
28
        href={navItem.path}
29
        className="py-2 text-gray-600 text-[14px] md:hover:text-[#338E03] uppercase"
30
      >
31
        {navItem.name}
32
      </a>
33
    </li>
34
  ));
35

36
  return (
1✔
37
    <div className="w-full flex xs:mt-2 flex-row bg-gray-100 py-4 px-10 md:px-24 xl:px-60 xs:px-2 xs:z-40 justify-between xs:flex-row-reverse">
38
      <ul className="hidden md:flex flex-row gap-4">
39
        {menuItems}
40
      </ul>
41
      <Button
42
        onClick={async () => {
43
          await dispatch(logout()).unwrap();
×
44
          navigate('/auth');
×
45
        }}
46
        className="!my-0 !p-0 h-full !bg-gray-100 hover:text-[#ecffe7]"
47
      >
48
        <div className="flex text-gray-600">
49
          <img src={LogoutIcon} alt="Logout Icon" className="w-[24px] h-[24px]" />
50
          <div className="ml-2 xs:hidden sm:hidden md:block">Logout</div>
51

52
        </div>
53
      </Button>
54
      <div className="md:hidden flex items-center">
55
        {showMenu ? (
1!
56
          <>
57
            <svg
58
              xmlns="http://www.w3.org/2000/svg"
59
              className="h-6 w-6 text-gray-600 cursor-pointer mr-4"
60
              fill="none"
61
              viewBox="0 0 24 24"
62
              stroke="currentColor"
63
              onClick={toggleMenu}
64
            >
65
              <path
66
                strokeLinecap="round"
67
                strokeLinejoin="round"
68
                strokeWidth={2}
69
                d="M6 18L18 6M6 6l12 12"
70
              />
71
            </svg>
72
            <ul className="fixed top-0 left-0 w-full h-full bg-gray-100 flex flex-col items-center justify-center">
73
              {menuItems}
74
              <button
75
                className="text-gray-600 mt-4 uppercase font-medium text-sm"
76
                onClick={toggleMenu}
77
              >
78
                Close
79
              </button>
80
            </ul>
81
          </>
82
        ) : (
83
          <svg
84
            xmlns="http://www.w3.org/2000/svg"
85
            className="h-6 w-6 text-gray-600 cursor-pointer"
86
            fill="none"
87
            viewBox="0 0 24 24"
88
            stroke="currentColor"
89
            onClick={toggleMenu}
90
          >
91
            <path
92
              strokeLinecap="round"
93
              strokeLinejoin="round"
94
              strokeWidth={2}
95
              d="M4 6h16M4 12h16M4 18h16"
96
            />
97
          </svg>
98
        )}
99
      </div>
100
    </div>
101
  );
102
};
103

104
export default SubMenu;
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

© 2026 Coveralls, Inc