Skip to content

Commit 54c7340

Browse files
committed
fix: sonarcloud errors
1 parent bfc151b commit 54c7340

File tree

1 file changed

+36
-38
lines changed

1 file changed

+36
-38
lines changed

src/sections/user/view/user-profile-view.tsx

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -116,44 +116,42 @@ const UserProfileView = ({ id }: any) => {
116116
);
117117

118118
return (
119-
<>
120-
<Container maxWidth={settings.themeStretch ? false : 'lg'} sx={{ overflowX: 'hidden' }}>
121-
<ProfileHeader profile={profile as any}>
122-
<Tabs
123-
key={`tabs-${profile?.id}`}
124-
value={currentTab}
125-
onChange={handleChangeTab}
126-
sx={{
127-
width: 1,
128-
zIndex: 9,
129-
borderBottom: '1px solid rgba(255, 255, 255, 0.08)',
130-
[`& .${tabsClasses.flexContainer}`]: { justifyContent: 'center' },
131-
}}
132-
>
133-
{tabsWithCounts.map((tab) => (
134-
<Tab
135-
key={tab.value}
136-
value={tab.value}
137-
label={<TabLabel label={tab.label} count={tab.count} />}
138-
/>
139-
))}
140-
</Tabs>
141-
</ProfileHeader>
142-
143-
{currentTab === 'publications' && profile && (
144-
<ProfileHome
145-
publications={publications}
146-
noPaddings={true}
147-
scrollable={false}
148-
initialRows={3}
149-
rowsIncrement={2}
150-
/>
151-
)}
152-
{currentTab === 'followers' && profile && (<ProfileFollowers onActionFinished={handleUpdateProfile} />)}
153-
{currentTab === 'following' && profile && <ProfileFollowing />}
154-
{currentTab === 'referrals' && sessionData?.profile?.id === id && <ProfileReferrals referrals={referrals} loading={loadingReferrals} />}
155-
</Container>
156-
</>
119+
<Container maxWidth={settings.themeStretch ? false : 'lg'} sx={{ overflowX: 'hidden' }}>
120+
<ProfileHeader profile={profile as any}>
121+
<Tabs
122+
key={`tabs-${profile?.id}`}
123+
value={currentTab}
124+
onChange={handleChangeTab}
125+
sx={{
126+
width: 1,
127+
zIndex: 9,
128+
borderBottom: '1px solid rgba(255, 255, 255, 0.08)',
129+
[`& .${tabsClasses.flexContainer}`]: { justifyContent: 'center' },
130+
}}
131+
>
132+
{tabsWithCounts.map((tab) => (
133+
<Tab
134+
key={tab.value}
135+
value={tab.value}
136+
label={<TabLabel label={tab.label} count={tab.count} />}
137+
/>
138+
))}
139+
</Tabs>
140+
</ProfileHeader>
141+
142+
{currentTab === 'publications' && profile && (
143+
<ProfileHome
144+
publications={publications}
145+
noPaddings={true}
146+
scrollable={false}
147+
initialRows={3}
148+
rowsIncrement={2}
149+
/>
150+
)}
151+
{currentTab === 'followers' && profile && (<ProfileFollowers onActionFinished={handleUpdateProfile} />)}
152+
{currentTab === 'following' && profile && <ProfileFollowing />}
153+
{currentTab === 'referrals' && sessionData?.profile?.id === id && <ProfileReferrals referrals={referrals} loading={loadingReferrals} />}
154+
</Container>
157155
);
158156
};
159157

0 commit comments

Comments
 (0)