Skip to content

Commit 1b0f56f

Browse files
committed
Fix suspense issue
1 parent 871dda7 commit 1b0f56f

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

apps/landing/src/components/Header/HeaderWrap.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
'use client'
22

33
import { Box, Flex } from '@devup-ui/react'
4-
import { usePathname, useSearchParams } from 'next/navigation'
5-
import { Suspense } from 'react'
4+
import { usePathname } from 'next/navigation'
65

76
import { isRoot } from '../../utils/is-root'
87

@@ -19,17 +18,14 @@ export function HeaderWrap({ children }: { children: React.ReactNode }) {
1918
w="100%"
2019
zIndex={1}
2120
>
22-
<Suspense>
23-
<HeaderWrapInner>{children}</HeaderWrapInner>
24-
</Suspense>
21+
<HeaderWrapInner>{children}</HeaderWrapInner>
2522
</Box>
2623
)
2724
}
2825

2926
function HeaderWrapInner({ children }: { children: React.ReactNode }) {
3027
const path = usePathname()
3128
const root = isRoot(path)
32-
const menu = useSearchParams().get('menu') === '1'
3329
return (
3430
<Flex
3531
alignItems="center"
@@ -40,7 +36,7 @@ function HeaderWrapInner({ children }: { children: React.ReactNode }) {
4036
justifyContent="space-between"
4137
maxW={root ? '1440px' : '100%'}
4238
mx="auto"
43-
pl={[menu ? null : 4, 5, '40px']}
39+
pl={[null, 5, '40px']}
4440
pr={[null, 5, '40px']}
4541
>
4642
{children}

apps/landing/src/components/Header/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export function Header() {
3737
<Link
3838
className={css({
3939
textDecoration: 'none',
40+
ml: 4,
4041
})}
4142
href={URL_PREFIX + '/'}
4243
>

0 commit comments

Comments
 (0)