Skip to content

Commit cb3fe37

Browse files
fix: Update codecov dark logo and fix broken invoice img (#3729)
1 parent 95c655d commit cb3fe37

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

public/logo_dark.svg

Lines changed: 16 additions & 0 deletions
Loading

src/pages/PlanPage/subRoutes/InvoiceDetailsPage/InvoiceDetail.test.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { render, screen, waitFor } from '@testing-library/react'
22
import { MemoryRouter } from 'react-router-dom'
33

4+
import { ThemeContextProvider } from 'shared/ThemeContext/ThemeContext'
45
import { Plans } from 'shared/utils/billing'
56

67
import InvoiceDetail from './InvoiceDetail'
@@ -117,7 +118,9 @@ describe('InvoiceDetail', () => {
117118
})
118119
render(
119120
<MemoryRouter initialEntries={[url]}>
120-
<InvoiceDetail />
121+
<ThemeContextProvider>
122+
<InvoiceDetail />
123+
</ThemeContextProvider>
121124
</MemoryRouter>
122125
)
123126
}

src/pages/PlanPage/subRoutes/InvoiceDetailsPage/sections/InvoiceHeader.test.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { MemoryRouter, Route, Switch } from 'react-router-dom'
33
import { z } from 'zod'
44

55
import { InvoiceSchema } from 'services/account'
6+
import { ThemeContextProvider } from 'shared/ThemeContext/ThemeContext'
67
import { Plans } from 'shared/utils/billing'
78

89
import InvoiceHeader from './InvoiceHeader'
@@ -114,9 +115,11 @@ const accountDetails = ({ collectionMethod = '' } = {}) => {
114115
const wrapper: React.FC<React.PropsWithChildren> = ({ children }) => (
115116
<MemoryRouter initialEntries={['/plan/gh/invoices/9']}>
116117
<Switch>
117-
<Route path="/plan/:provider/invoices/:id" exact>
118-
{children}
119-
</Route>
118+
<ThemeContextProvider>
119+
<Route path="/plan/:provider/invoices/:id" exact>
120+
{children}
121+
</Route>
122+
</ThemeContextProvider>
120123
</Switch>
121124
</MemoryRouter>
122125
)

src/pages/PlanPage/subRoutes/InvoiceDetailsPage/sections/InvoiceHeader.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { z } from 'zod'
44

55
import { AccountDetailsSchema, InvoiceSchema } from 'services/account'
66
import { CollectionMethods } from 'shared/utils/billing'
7+
import LightDarkImg from 'ui/LightDarkImg'
78

89
import { generateAddressInfo } from './generateAddressInfo'
910
import InvoiceOverview from './InvoiceOverview'
@@ -27,9 +28,10 @@ function InvoiceHeader({ invoice, accountDetails }: InvoiceHeaderProps) {
2728
<div className="flex justify-between">
2829
<InvoiceOverview isPaid={isPaid} invoice={invoice} dueDate={dueDate} />
2930
<div>
30-
<img
31+
<LightDarkImg
3132
alt="Codecov Logo"
32-
src={`${process.env.PUBLIC_URL}/logo.svg`}
33+
src="/logo.svg"
34+
darkSrc="/logo_dark.svg"
3335
width={200}
3436
/>
3537
</div>

0 commit comments

Comments
 (0)