mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-31 21:14:48 -04:00
Reload page after sign up
This commit is contained in:
@@ -248,6 +248,7 @@ function UserPageInner(props: ActiveUserPageProps) {
|
||||
const router = useRouter()
|
||||
const {query} = router
|
||||
const fromSignup = query.fromSignup === 'true'
|
||||
const reloaded = query.reloaded === 'true'
|
||||
|
||||
const currentUser = useUser()
|
||||
const isCurrentUser = currentUser?.id === user?.id
|
||||
@@ -263,6 +264,15 @@ function UserPageInner(props: ActiveUserPageProps) {
|
||||
const profile = clientProfile ?? staticProfile
|
||||
// console.debug('profile:', user?.username, profile, clientProfile, staticProfile)
|
||||
|
||||
if (fromSignup && !reloaded) {
|
||||
console.log('Reloading page after signup')
|
||||
router.replace({
|
||||
pathname: router.pathname,
|
||||
query: {...query, reloaded: 'true'},
|
||||
})
|
||||
window.location.reload()
|
||||
}
|
||||
|
||||
if (!isCurrentUser && profile?.disabled) {
|
||||
return <PageBase
|
||||
trackPageView={'user page'}
|
||||
|
||||
Reference in New Issue
Block a user