Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 5b515e1

Browse files
committed
refactor(home-navi): use common navi func
1 parent 92d75ca commit 5b515e1

File tree

4 files changed

+11
-18
lines changed

4 files changed

+11
-18
lines changed

config/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"//--- contact configs ---//": "",
6060
"EMAIL_SUPPORT": "coderplanets@outlook.com",
6161
"// GRAPHQL_ENDPOINT": "https://api.coderplanets.com/graphiql",
62-
"BUILD_VERSION": "v2.0.94",
62+
"BUILD_VERSION": "v2.0.95",
6363
"// 1000 * 60 * 10 = 10 mins": "",
6464
"SSR_CACHE_TIME": 60000
6565
}

deploy/production/web.tar.gz

271 Bytes
Binary file not shown.

src/containers/unit/ModeLineMenu/GlobalMenu/HomeNavi.tsx

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
import { FC, memo } from 'react'
22

3-
import Link from 'next/link'
3+
import { HCN } from '@/constant'
4+
import { changeToCommunity } from '@/utils/helper'
45

5-
import {
6-
Wrapper,
7-
Logo,
8-
Block,
9-
Title,
10-
// ArrowIcon,
11-
} from '../styles/global_menu/home_navi'
6+
import { Wrapper, Logo, Block, Title } from '../styles/global_menu/home_navi'
127

138
const HomeNavi: FC = () => {
149
return (
15-
<Link href="/">
16-
<Wrapper>
17-
<Logo />
18-
<Block>
19-
<Title>oderPlanets</Title>
20-
</Block>
21-
</Wrapper>
22-
</Link>
10+
<Wrapper onClick={() => changeToCommunity(HCN)}>
11+
<Logo />
12+
<Block>
13+
<Title>首页</Title>
14+
</Block>
15+
</Wrapper>
2316
)
2417
}
2518

src/containers/unit/ModeLineMenu/styles/global_menu/home_navi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const Logo = styled(SiteLogo)`
2121
`
2222
export const Block = styled.div`
2323
${css.flex('align-center')};
24-
margin-left: 2px;
24+
margin-left: 8px;
2525
`
2626
export const Title = styled.div`
2727
color: ${theme('thread.articleTitle')};

0 commit comments

Comments
 (0)