Skip to content

Commit 56045b9

Browse files
committed
make recentl profile div clickable
1 parent 92e0195 commit 56045b9

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/components/Sidebar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ const Sidebar = ({
190190
general: [
191191
{ location: '/', text: 'Home' },
192192
{ location: '/schedule', text: 'Schedule' },
193-
{ location: '/livestream', text: 'Livestream' },
193+
// { location: '/livestream', text: 'Livestream' },
194194
{ location: '/rewards', text: 'Rewards' },
195195
{ location: '/sponsors', text: 'Sponsors' },
196196
{ location: '/social', text: 'Portal Profiles' },

src/components/Social/ViewSocial.jsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,16 @@ const DateText = styled.p`
314314
const StyledTrashIcon = styled(TrashIcon)`
315315
width: 25px;
316316
height: 25px;
317+
position: relative;
318+
z-index: 2;
317319
318320
& path {
319321
fill: ${p => p.theme.colors.text};
320322
}
321323
`
322324

323325
const Profile = styled.div`
326+
position: relative;
324327
display: flex;
325328
justify-content: space-between;
326329
align-items: center;
@@ -337,6 +340,7 @@ const Profile = styled.div`
337340
338341
&:hover ${Username} {
339342
color: ${p => p.theme.colors.button.primary.text};
343+
text-decoration: underline;
340344
}
341345
342346
&:hover ${DateText} {
@@ -354,6 +358,12 @@ const Profile = styled.div`
354358
}
355359
`
356360

361+
const ProfileLink = styled.a`
362+
position: absolute;
363+
inset: 0;
364+
z-index: 1;
365+
`
366+
357367
const Text = styled.p`
358368
font-size: 18px;
359369
font-weight: 500;
@@ -474,9 +484,8 @@ const ViewSocial = ({
474484
<RecentlyViewedContainer>
475485
{recentlyViewedProfiles.map((profile, index) => (
476486
<Profile key={index}>
477-
<Username href={`/app/${activeHackathon}/social/${profile.profileId}`}>
478-
{profile.name}
479-
</Username>
487+
<ProfileLink href={`/app/${activeHackathon}/social/${profile.profileId}`} />
488+
<Username>{profile.name}</Username>
480489
<IconSection>
481490
<DateText>
482491
{new Date(profile.viewedAt.seconds * 1000).toLocaleDateString()}

0 commit comments

Comments
 (0)