Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-jams
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-jams
Commits
4ddce1db
Commit
4ddce1db
authored
4 years ago
by
Larbi Gharib
Browse files
Options
Downloads
Patches
Plain Diff
Fix redirect to null user
Change-Id: I165af0a0854991f0a8d7c9168691049cb6e05268
parent
76928a3c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jams-react-client/src/views/UserProfile/UserProfile.js
+9
-1
9 additions, 1 deletion
jams-react-client/src/views/UserProfile/UserProfile.js
with
9 additions
and
1 deletion
jams-react-client/src/views/UserProfile/UserProfile.js
+
9
−
1
View file @
4ddce1db
import
React
from
"
react
"
;
import
{
useHistory
}
from
"
react-router-dom
"
;
// core components
import
Devices
from
"
components/Devices/Devices.js
"
;
...
...
@@ -18,6 +19,8 @@ import DisplayUserProfile from "./DisplayUserProfile";
import
i18next
from
"
i18next
"
;
import
auth
from
"
auth.js
"
;
function
TabPanel
(
props
)
{
const
{
children
,
value
,
index
,
...
other
}
=
props
;
...
...
@@ -52,6 +55,7 @@ function a11yProps(index) {
}
export
default
function
UserProfile
(
props
)
{
const
history
=
useHistory
();
const
[
value
,
setValue
]
=
React
.
useState
(
0
);
const
[
displayUser
,
setDisplayUser
]
=
React
.
useState
(
true
);
...
...
@@ -60,7 +64,11 @@ export default function UserProfile(props) {
setValue
(
newValue
);
};
React
.
useEffect
(()
=>
{},
[]);
React
.
useEffect
(()
=>
{
if
(
props
.
username
===
"
null
"
)
{
history
.
push
(
"
/
"
);
}
},
[]);
return
(
<
div
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment