mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-01 07:37:55 -05:00
hot fix for user pages not logged in bug
This commit is contained in:
1
index.js
1
index.js
@@ -61,7 +61,6 @@ passport.serializeUser(function(user, done) {
|
||||
})
|
||||
|
||||
passport.deserializeUser(function(discord_id, done) {
|
||||
console.log("de")
|
||||
User.findOne({ discord_id }, function(err, user) {
|
||||
done(err, user)
|
||||
})
|
||||
|
||||
14
react-ui/src/components/user/UserPage.js
vendored
14
react-ui/src/components/user/UserPage.js
vendored
@@ -27,7 +27,6 @@ const UserPage = () => {
|
||||
const [errorMsg, setErrorMsg] = useState(null)
|
||||
|
||||
const handleError = error => {
|
||||
console.error(error)
|
||||
setErrorMsg(error.message)
|
||||
setTimeout(() => {
|
||||
setErrorMsg(null)
|
||||
@@ -81,6 +80,7 @@ const UserPage = () => {
|
||||
setTab(activeIndex)
|
||||
}
|
||||
|
||||
console.log("userLeanQuery", userLeanQuery)
|
||||
return (
|
||||
<>
|
||||
<>
|
||||
@@ -100,11 +100,13 @@ const UserPage = () => {
|
||||
</Grid.Column>
|
||||
<ProfileLists user={userData} />
|
||||
<Grid.Column>
|
||||
{!showSettings && userData.id === userLeanQuery.data.user.id && (
|
||||
<Button onClick={() => setShowSettings(!showSettings)}>
|
||||
Profile settings
|
||||
</Button>
|
||||
)}
|
||||
{!showSettings &&
|
||||
userLeanQuery.data.user &&
|
||||
userData.id === userLeanQuery.data.user.id && (
|
||||
<Button onClick={() => setShowSettings(!showSettings)}>
|
||||
Profile settings
|
||||
</Button>
|
||||
)}
|
||||
</Grid.Column>
|
||||
</Grid>
|
||||
{successMsg && <Message positive>{successMsg}</Message>}
|
||||
|
||||
Reference in New Issue
Block a user