Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
10cbe0d5
Commit
10cbe0d5
authored
Jun 27, 2019
by
ιεΈ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: should use useEffect
parent
4420ae2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/layouts/BasicLayout.tsx
src/layouts/BasicLayout.tsx
+7
-7
No files found.
src/layouts/BasicLayout.tsx
View file @
10cbe0d5
...
...
@@ -4,19 +4,19 @@
* https://github.com/ant-design/ant-design-pro-layout
*/
import
{
ConnectProps
,
ConnectState
}
from
'
@/models/connect
'
;
import
ProLayout
,
{
MenuDataItem
,
BasicLayoutProps
as
ProLayoutProps
,
Settings
,
}
from
'
@ant-design/pro-layout
'
;
import
React
,
{
useState
}
from
'
react
'
;
import
Authorized
from
'
@/utils/Authorized
'
;
import
React
,
{
useEffect
}
from
'
react
'
;
import
Link
from
'
umi/link
'
;
import
RightContent
from
'
@/components/GlobalHeader/RightContent
'
;
import
{
connect
}
from
'
dva
'
;
import
{
formatMessage
}
from
'
umi-plugin-react/locale
'
;
import
Authorized
from
'
@/utils/Authorized
'
;
import
RightContent
from
'
@/components/GlobalHeader/RightContent
'
;
import
{
ConnectProps
,
ConnectState
}
from
'
@/models/connect
'
;
import
{
isAntDesignPro
}
from
'
@/utils/utils
'
;
import
logo
from
'
../assets/logo.svg
'
;
...
...
@@ -75,7 +75,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = props => {
* constructor
*/
use
State
(()
=>
{
use
Effect
(()
=>
{
if
(
dispatch
)
{
dispatch
({
type
:
'
user/fetchCurrent
'
,
...
...
@@ -84,7 +84,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = props => {
type
:
'
settings/getSetting
'
,
});
}
});
}
,
[]
);
/**
* init variables
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment