diff --git a/packages/components/src/UserStatistics/UserStatistics.tsx b/packages/components/src/UserStatistics/UserStatistics.tsx
index 32f5c7d136..69c501f0cb 100644
--- a/packages/components/src/UserStatistics/UserStatistics.tsx
+++ b/packages/components/src/UserStatistics/UserStatistics.tsx
@@ -8,7 +8,6 @@ import { ExternalLink } from '../ExternalLink/ExternalLink'
import { Icon } from '../Icon/Icon'
import { InternalLink } from '../InternalLink/InternalLink'
-import type { EmotionJSX } from '@emotion/react/types/jsx-namespace'
import type { ThemeUIStyleObject } from 'theme-ui'
export interface UserStatisticsProps {
@@ -19,7 +18,7 @@ export interface UserStatisticsProps {
howtoCount: number
usefulCount: number
researchCount: number
- total_views?: EmotionJSX.Element
+ totalViews?: number
sx?: ThemeUIStyleObject | undefined
}
@@ -112,7 +111,13 @@ export const UserStatistics = (props: UserStatisticsProps) => {
) : null}
- {props.total_views}
+
+ {props.totalViews ? (
+
+
+ Views: {props.totalViews}
+
+ ) : null}
)
@@ -123,4 +128,4 @@ const isEmpty = (props: UserStatisticsProps) =>
!props.isSupporter &&
!props.usefulCount &&
!props.howtoCount &&
- !props.total_views
+ !props.totalViews
diff --git a/src/pages/User/content/MemberProfile.tsx b/src/pages/User/content/MemberProfile.tsx
index 2f32490522..a356425e06 100644
--- a/src/pages/User/content/MemberProfile.tsx
+++ b/src/pages/User/content/MemberProfile.tsx
@@ -1,4 +1,4 @@
-import { Icon, MemberBadge, Username, UserStatistics } from 'oa-components'
+import { MemberBadge, Username, UserStatistics } from 'oa-components'
import { ExternalLinkLabel, ProfileTypeList, UserRole } from 'oa-shared'
import DefaultMemberImage from 'src/assets/images/default_member.svg'
import { AuthWrapper } from 'src/common/AuthWrapper'
@@ -31,18 +31,6 @@ export const MemberProfile = ({ docs, user }: IProps) => {
? cdnImageUrl(userImage.downloadUrl)
: DefaultMemberImage
- const total_views = user.total_views
-
- const totalViews = (total_views: number | undefined) =>
- total_views ? (
-
-
-
- Views: {total_views}
-
-
- ) : undefined
-
return (
{
height: '120px',
}}
/>
-
+
+ }
+ >
+
+
{
),
)
- const total_views = user.total_views
-
- const totalViews = (total_views: number | undefined) =>
- total_views ? (
-
-
-
- Views: {total_views}
-
-
- ) : undefined
-
return (
@@ -308,16 +295,31 @@ export const SpaceProfile = ({ user, docs }: IProps) => {
mt: [3, 3, 0],
}}
>
-
+
+ }
+ >
+
+