Skip to content

Commit

Permalink
Remove duplicate settings button
Browse files Browse the repository at this point in the history
  • Loading branch information
jennymul committed Nov 6, 2024
1 parent 01aac3d commit a705278
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
12 changes: 8 additions & 4 deletions app/routes/users/components/UserProfile/UserProfile.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,18 @@
margin-bottom: var(--spacing-lg);
}

.settingsIcon {
transition: transform var(--easing-medium);

.settingsButton {
&:hover {
transform: rotate(90deg);
.settingsIcon {
transform: rotate(90deg);
}
}
}

.settingsIcon {
transition: transform var(--easing-medium);
}

.soMeIcon {
color: var(--lego-font-color);
margin-right: var(--spacing-sm);
Expand Down
23 changes: 11 additions & 12 deletions app/routes/users/components/UserProfile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,17 @@ const UserProfile = () => {
title={user.fullName}
actionButtons={
showSettings && (
<Icon
iconNode={<SettingsIcon />}
size={22}
className={styles.settingsIcon}
to={`/users/${user.username}/settings/profile`}
/>
<LinkButton
className={styles.settingsButton}
href={`/users/${user.username}/settings/profile`}
>
<Icon
iconNode={<SettingsIcon />}
size={22}
className={styles.settingsIcon}
/>{' '}
Innstillinger
</LinkButton>
)
}
>
Expand Down Expand Up @@ -195,12 +200,6 @@ const UserProfile = () => {
</Modal>
</DialogTrigger>
)}
{showSettings && (
<LinkButton href={`/users/${user.username}/settings/profile`}>
<Icon iconNode={<SettingsIcon />} size={19} />
Innstillinger
</LinkButton>
)}
</Flex>
<Flex
alignItems="center"
Expand Down

0 comments on commit a705278

Please sign in to comment.