mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-25 01:51:37 -04:00
Fix
This commit is contained in:
@@ -28,7 +28,12 @@ import {isNativeMobile} from 'web/lib/util/webview'
|
||||
import Custom404 from '../404'
|
||||
|
||||
async function getUserAndProfile(username: string) {
|
||||
return await unauthedApi('get-user-and-profile', {username})
|
||||
try {
|
||||
return await unauthedApi('get-user-and-profile', {username})
|
||||
} catch (e) {
|
||||
console.error('Error in getUserAndProfile:', e)
|
||||
}
|
||||
return {profile: null, user: null}
|
||||
}
|
||||
|
||||
// getServerSideProps is a Next.js function that can be used to fetch data and render the contents of a page at request time.
|
||||
|
||||
Reference in New Issue
Block a user