Skip to content

Commit

Permalink
fix: Update codecov dark logo and fix broken invoice img (#3729)
Browse files Browse the repository at this point in the history
  • Loading branch information
calvin-codecov authored Feb 13, 2025
1 parent 95c655d commit cb3fe37
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
16 changes: 16 additions & 0 deletions public/logo_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { render, screen, waitFor } from '@testing-library/react'
import { MemoryRouter } from 'react-router-dom'

import { ThemeContextProvider } from 'shared/ThemeContext/ThemeContext'
import { Plans } from 'shared/utils/billing'

import InvoiceDetail from './InvoiceDetail'
Expand Down Expand Up @@ -117,7 +118,9 @@ describe('InvoiceDetail', () => {
})
render(
<MemoryRouter initialEntries={[url]}>
<InvoiceDetail />
<ThemeContextProvider>
<InvoiceDetail />
</ThemeContextProvider>
</MemoryRouter>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { MemoryRouter, Route, Switch } from 'react-router-dom'
import { z } from 'zod'

import { InvoiceSchema } from 'services/account'
import { ThemeContextProvider } from 'shared/ThemeContext/ThemeContext'
import { Plans } from 'shared/utils/billing'

import InvoiceHeader from './InvoiceHeader'
Expand Down Expand Up @@ -114,9 +115,11 @@ const accountDetails = ({ collectionMethod = '' } = {}) => {
const wrapper: React.FC<React.PropsWithChildren> = ({ children }) => (
<MemoryRouter initialEntries={['/plan/gh/invoices/9']}>
<Switch>
<Route path="/plan/:provider/invoices/:id" exact>
{children}
</Route>
<ThemeContextProvider>
<Route path="/plan/:provider/invoices/:id" exact>
{children}
</Route>
</ThemeContextProvider>
</Switch>
</MemoryRouter>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { z } from 'zod'

import { AccountDetailsSchema, InvoiceSchema } from 'services/account'
import { CollectionMethods } from 'shared/utils/billing'
import LightDarkImg from 'ui/LightDarkImg'

import { generateAddressInfo } from './generateAddressInfo'
import InvoiceOverview from './InvoiceOverview'
Expand All @@ -27,9 +28,10 @@ function InvoiceHeader({ invoice, accountDetails }: InvoiceHeaderProps) {
<div className="flex justify-between">
<InvoiceOverview isPaid={isPaid} invoice={invoice} dueDate={dueDate} />
<div>
<img
<LightDarkImg
alt="Codecov Logo"
src={`${process.env.PUBLIC_URL}/logo.svg`}
src="/logo.svg"
darkSrc="/logo_dark.svg"
width={200}
/>
</div>
Expand Down

0 comments on commit cb3fe37

Please sign in to comment.