Skip to content

Commit

Permalink
chore: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
calvin-codecov committed Jan 30, 2025
1 parent f0bdf8e commit 6ae3e3c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ describe('TokenlessBanner', () => {

it('renders nothing when tokenlessSection flag is false', () => {
setup({ tokenlessSection: false, currentUser: mockSignedInUser })
const { container } = render(<TokenlessBanner />, { wrapper: wrapper(['/gh/codecov']) })
const { container } = render(<TokenlessBanner />, {
wrapper: wrapper(['/gh/codecov']),
})
expect(container).toBeEmptyDOMElement()
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ const TokenlessBanner: React.FC = () => {
// @ts-expect-error useLocationParams needs to be typed
const cameFromOnboarding = params['source'] === ONBOARDING_SOURCE

if (!tokenlessSection || !owner || !data || !currentUser?.user || cameFromOnboarding) return null
if (
!tokenlessSection ||
!owner ||
!data ||
!currentUser?.user ||
cameFromOnboarding
)
return null

return data?.uploadTokenRequired ? (
<TokenRequiredBanner />
Expand Down

0 comments on commit 6ae3e3c

Please sign in to comment.