Skip to content

Commit e59b7c8

Browse files
theme
1 parent cd95859 commit e59b7c8

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

custom-implementation/src/components/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ any) => {
4646
logo={logo}
4747
items={links}
4848
actions={actions}
49-
version={theme === 'dark' ? 'dark' : 'light'} // Ensure the theme is correctly reflected
49+
version={theme === 'dark' ? 'dark' : 'light'} // Reflect the theme correctly
5050
collapseOnScroll={collapseOnScroll}
5151
wrapperClassName="custom-header"
5252
/>

custom-implementation/src/main.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@ import './main.css'
22
import '@devrev/marketing-shared-components/dist/cjs/index.css'
33

44
import ReactDOM from 'react-dom'
5-
65
import React from 'react'
7-
86
import Header from './components/header'
97
import Footer from './components/footer'
108
import { ThemeSwitch } from './components/theme-switch'
11-
129
import { getPageData } from './modules/sanity/utils'
1310

1411
const render = async () => {
1512
/*
16-
* This is a where we try to make async data call.
13+
* This is where we try to make async data call.
1714
*/
1815

1916
const data = await getPageData()
@@ -32,7 +29,7 @@ const render = async () => {
3229
ReactDOM.render(
3330
React.createElement(Header, {
3431
...data.header,
35-
version: theme == 'dark' ? 'light' : 'dark',
32+
version: theme === 'dark' ? 'dark' : 'light', // Ensure version is correctly set based on theme
3633
}),
3734
document.getElementById('fern-header'),
3835
() => {

0 commit comments

Comments
 (0)