File tree Expand file tree Collapse file tree 2 files changed +2
-378
lines changed Expand file tree Collapse file tree 2 files changed +2
-378
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import { Helmet } from 'react-helmet';
9
9
import { ArticleRecommend } from '@/components/ArticleRecommend' ;
10
10
import { GlobalContext } from '@/context/global' ;
11
11
import { DoubleColumnLayout } from '@/layout/DoubleColumnLayout' ;
12
- import config from './config' ;
13
12
14
13
import AboutUs from '@/components/AboutUs' ;
15
14
import { Tags } from '@/components/Tags' ;
@@ -145,7 +144,8 @@ const Article: NextPage<IProps> = ({ article }) => {
145
144
Article . getInitialProps = async ( ctx ) => {
146
145
const { id } = ctx . query ;
147
146
const [ siteKey ] = typeof id === 'string' ? id . split ( '.' ) : id ;
148
- const urlItem = config . urlConfig
147
+ const { globalSetting } = useContext ( GlobalContext ) ;
148
+ const urlItem = globalSetting ?. globalConfig ?. urlConfig
149
149
. map ( ( item ) => item . children )
150
150
. flat ( )
151
151
. find ( ( item ) => item . key === siteKey ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments