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

CaptainFact / captain-fact-frontend / 19991788094

06 Dec 2025 05:21PM UTC coverage: 5.575% (+0.08%) from 5.497%
19991788094

push

github

web-flow
deps: Remove styled-components (#1405)

43 of 1652 branches covered (2.6%)

Branch coverage included in aggregate %.

0 of 21 new or added lines in 8 files covered. (0.0%)

8 existing lines in 4 files now uncovered.

192 of 2563 relevant lines covered (7.49%)

0.18 hits per line

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

0.0
/app/components/Search/SearchBox.js
1
import React from 'react'
2
import { withTranslation } from 'react-i18next'
3
import { SearchBox as AlgoliaSearchBox } from 'react-instantsearch-dom'
4
import { withRouter } from 'react-router'
5

6
/** Global Search Box */
7
const SearchBox = ({ location, history, t }) => {
×
8
  return (
×
9
    <div className="[&_input[type='search']]:border [&_input[type='search']]:border-[lightgrey] [&_input[type='search']]:p-2 [&_input[type='search']]:rounded [&_input[type='search']]:pl-8 [&_input[type='search']]:bg-[#fafafa] [&_input[type='search']]:text-sm [&_input[type='search']]:outline-none [&_input[type='search']]:w-full [&_input[type='search']:focus]:border-[#6ba3a7] [&_input[type='search']:focus]:shadow-[0_0_0_0.125em_rgb(107_163_167_/_25%)] [&_button[type='submit']]:absolute [&_button[type='submit']]:left-2.5 [&_button[type='submit']]:top-3 [&_button[type='submit']]:border-0 [&_button[type='submit']]:cursor-pointer [&_button[type='submit']]:bg-none [&_button[type='submit']_svg]:w-[15px] [&_button[type='submit']_svg]:h-[15px] [&_button[type='reset']]:absolute [&_button[type='reset']]:right-[15px] [&_button[type='reset']]:top-[15px] [&_button[type='reset']]:border-0 [&_button[type='reset']]:bg-none [&_button[type='reset']]:cursor-pointer">
10
      <AlgoliaSearchBox
11
        translations={{ placeholder: t('search.placeholder') }}
12
        searchAsYouType={false}
13
        onSubmit={(e) => {
NEW
14
          e.preventDefault()
×
NEW
15
          const term = e.target.elements[0].value
×
NEW
16
          const isSearchPage = location.pathname.startsWith('/search')
×
NEW
17
          const route = isSearchPage ? location.pathname : '/search'
×
NEW
18
          history.push(`${route}?term=${encodeURIComponent(term)}`)
×
19
        }}
20
        onReset={(e) => {
NEW
21
          e.preventDefault()
×
NEW
22
          const isSearchPage = location.pathname.startsWith('/search')
×
NEW
23
          const route = isSearchPage ? location.pathname : '/search'
×
NEW
24
          history.push(route)
×
25
        }}
26
      />
27
    </div>
28
  )
29
}
30

31
export default withTranslation('main')(withRouter(SearchBox))
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