Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit4e55057

Browse files
authored
chore: reduce bundle size (#1371)
* chore(build): rm un-used thread* chore(version): bump to 1.0.6
1 parent8f4d40a commit4e55057

File tree

4 files changed

+24
-40
lines changed

4 files changed

+24
-40
lines changed

‎deploy/production/web.tar.gz‎

-58 Bytes
Binary file not shown.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"coderplanets_web",
3-
"version":"1.0.5",
3+
"version":"1.0.6",
44
"license":"Apache License 2.0",
55
"scripts": {
66
"dev":"cross-env NODE_ENV=dev next dev",

‎src/containers/content/CommunityContent/ThreadContent.tsx‎

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,43 @@
11
import{FC,memo}from'react'
2+
importdynamicfrom'next/dynamic'
23

34
importtype{TThread}from'@/spec'
45
import{THREAD}from'@/constant'
56

7+
import{LavaLampLoading}from'@/widgets/Loading'
8+
69
importArticlesThreadfrom'@/containers//thread/ArticlesThread'
710
importKanbanThreadfrom'@/containers//thread/KanbanThread'
811
importChangeThreadfrom'@/containers//thread/ChangelogThread'
912
// import ReposThread from '@/containers/thread/ReposThread'
10-
importCperMapThreadfrom'@/containers/thread/CperMapThread'
13+
// import CperMapThread from '@/containers/thread/CperMapThread'
14+
// import WipThread from './WipThread'
1115
importAboutThreadfrom'@/containers/thread/AboutThread'
1216
importHelpThreadfrom'@/containers/thread/HelpThread'
13-
importDashboardThreadfrom'@/containers/thread/DashboardThread'
17+
//import DashboardThread from '@/containers/thread/DashboardThread'
1418

15-
importWipThreadfrom'./WipThread'
19+
constDashboardThread=dynamic(
20+
()=>import('@/containers/thread/DashboardThread'),
21+
{
22+
/* eslint-disable react/display-name */
23+
loading:()=><LavaLampLoading/>,
24+
ssr:false,
25+
},
26+
)
1627

1728
typeTProps={
1829
thread:TThread
1930
}
2031

2132
constThreadContent:FC<TProps>=({ thread})=>{
2233
switch(thread){
23-
caseTHREAD.INTERVIEW:{
24-
return<WipThreadtitle="开发者访谈"/>
25-
}
26-
27-
caseTHREAD.TEAM:{
28-
return<WipThreadtitle="团队"/>
29-
}
34+
// case THREAD.CPER: {
35+
// return <CperMapThread />
36+
// }
3037

31-
caseTHREAD.PRODUCT:{
32-
return<WipThreadtitle="作品展示"/>
33-
}
34-
35-
caseTHREAD.GUIDE:{
36-
return<WipThreadtitle="酷导航"/>
37-
}
38-
39-
caseTHREAD.ACCOUNT:{
40-
return<WipThreadtitle="违规账户信息"/>
41-
}
42-
43-
caseTHREAD.CPER:{
44-
return<CperMapThread/>
45-
}
46-
47-
caseTHREAD.MAP:{
48-
return<CperMapThread/>
49-
}
38+
// case THREAD.MAP: {
39+
// return <CperMapThread />
40+
// }
5041

5142
caseTHREAD.ABOUT:{
5243
return<AboutThread/>

‎src/containers/digest/CommunityDigest/SimpleLayout/CommunityBrief.tsx‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { contains } from 'ramda'
33

44
importtype{TCommunity}from'@/spec'
55
import{ICON_CMD}from'@/config'
6-
import{HCN,NON_FILL_COMMUNITY}from'@/constant'
6+
import{NON_FILL_COMMUNITY}from'@/constant'
77

8-
importCommunityJoinSignfrom'@/widgets/CommunityJoinSign'
8+
//import CommunityJoinSign from '@/widgets/CommunityJoinSign'
99

1010
import{
1111
Wrapper,
@@ -17,7 +17,7 @@ import {
1717
TitleText,
1818
LogoHolder,
1919
}from'../styles/simple_layout/community_brief'
20-
import{subscribeCommunity,unsubscribeCommunity}from'../logic'
20+
//import { subscribeCommunity, unsubscribeCommunity } from '../logic'
2121

2222
constCommunityLogoHolder=`${ICON_CMD}/community_logo_holder.svg`
2323

@@ -43,13 +43,6 @@ const CommunityBrief: FC<TProps> = ({ community }) => {
4343
<TitleWrapper>
4444
<Title>
4545
<TitleText>{community.title}</TitleText>
46-
{community.raw!==HCN&&(
47-
<CommunityJoinSign
48-
onFollow={()=>subscribeCommunity(community.id)}
49-
onUndoFollow={()=>unsubscribeCommunity(community.id)}
50-
hasFollowed={community.viewerHasSubscribed}
51-
/>
52-
)}
5346
</Title>
5447
</TitleWrapper>
5548
</CommunityInfo>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp