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

Commit 335b58e

Browse files
authored
chore: load perf improve (#1374)
* refactor(import): use abs import & adjust pkg * chore: clean up * chore: fix import error
1 parent cf3c297 commit 335b58e

File tree

41 files changed

+86
-353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+86
-353
lines changed

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
"mastani-codehighlight": "0.0.7",
7070
"mobx": "^6.6.2",
7171
"mobx-react": "^7.5.3",
72-
"mobx-react-lite": "^3.4.0",
7372
"mobx-state-tree": "^5.1.6",
7473
"module-alias": "^2.0.1",
7574
"nanoid": "^3.1.12",

src/containers/content/CommunityContent/ThreadContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import dynamic from 'next/dynamic'
44
import type { TThread } from '@/spec'
55
import { THREAD } from '@/constant'
66

7-
import { LavaLampLoading } from '@/widgets/Loading'
7+
import LavaLampLoading from '@/widgets/Loading/LavaLampLoading'
88

99
import ArticlesThread from '@/containers//thread/ArticlesThread'
1010
import KanbanThread from '@/containers//thread/KanbanThread'

src/containers/content/ExploreContent/store.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,17 @@ const ExploreContentStore = T.model('ExploreContentStore', {
128128
},
129129
addSubscribedCommunity(community: TCommunity): void {
130130
const root = getParent(self) as TRootStore
131+
const slf = self as TStore
131132

132133
root.account.addSubscribedCommunity(community)
133-
root.exploreContent.toggleSubscribe(community)
134+
slf.toggleSubscribe(community)
134135
},
135136
removeSubscribedCommunity(community: TCommunity): void {
136137
const root = getParent(self) as TRootStore
138+
const slf = self as TStore
137139

138140
root.account.removeSubscribedCommunity(community)
139-
root.exploreContent.toggleSubscribe(community)
141+
slf.toggleSubscribe(community)
140142
},
141143
markRoute(query): void {
142144
const root = getParent(self) as TRootStore

src/containers/dynamic/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import dynamic from 'next/dynamic'
2-
import { LavaLampLoading } from '@/widgets/Loading'
2+
import LavaLampLoading from '@/widgets/Loading/LavaLampLoading'
33

44
export const ArticleFooter = dynamic(() => import('../unit/ArticleFooter'), {
55
ssr: false,

src/containers/editor/BlogEditor/Content/AuthorInputer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { FC, memo, Fragment } from 'react'
33
import type { TBlogRSS, TBlog, TEditMode, TRSSAuthor } from '@/spec'
44

55
import NoticeBar from '@/widgets/NoticeBar'
6-
import { LavaLampLoading } from '@/widgets/Loading'
6+
import LavaLampLoading from '@/widgets/Loading/LavaLampLoading'
77

88
import RSSItem from './TheRSSItem'
99
import FeedItem from './FeedItem'

src/containers/editor/BlogEditor/Content/RSSInputer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { FC, memo } from 'react'
22

3-
import { LavaLampLoading } from '@/widgets/Loading'
3+
import LavaLampLoading from '@/widgets/Loading/LavaLampLoading'
44
import EnterHint from '@/widgets/EnterHint'
55

66
import type { TValidState } from '../spec'

src/containers/editor/CommunityEditor/Banner/SetupDomain.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { SIZE } from '@/constant'
55
import { cutRest } from '@/utils/helper'
66

77
import ArrowButton from '@/widgets/Buttons/ArrowButton'
8-
import { LavaLampLoading } from '@/widgets/Loading'
8+
import LavaLampLoading from '@/widgets/Loading/LavaLampLoading'
99

1010
import InputBox from './InputBox'
1111

src/containers/editor/RichEditor/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import dynamic from 'next/dynamic'
8-
import { LavaLampLoading } from '@/widgets/Loading'
8+
import LavaLampLoading from '@/widgets/Loading/LavaLampLoading'
99

1010
export const RichEditor = dynamic(() => import('./RealEditor'), {
1111
/* eslint-disable react/display-name */

src/containers/layout/GlobalLayout/store.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ const GlobalLayout = T.model('GlobalLayoutStore', {
4545
return toJS(root.viewing.community)
4646
},
4747
get sidebarPin(): boolean {
48-
const root = getParent(self) as TRootStore
49-
return root.sidebar.pin
48+
// const root = getParent(self) as TRootStore
49+
// return root.sidebar.pin
50+
return false
5051
},
5152
get wallpaper(): string {
5253
const root = getParent(self) as TRootStore

0 commit comments

Comments
 (0)