Skip to content

Commit e4010d4

Browse files
committed
feat: Show auth provider icon in user info.
1 parent d67a39c commit e4010d4

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

src/features/settings/components/GeneralSettings/GeneralSettings.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import React from 'react'
2+
import { FaGithub } from 'react-icons/fa'
3+
import { FcGoogle } from 'react-icons/fc'
24
import Toggle from 'react-toggle'
35
import 'react-toggle/style.css'
46
import { Button, ChipsSet } from 'src/components/Elements'
@@ -34,6 +36,11 @@ const UserInfo = ({ user }: UserInfoProps) => {
3436
<div className="userInfos">
3537
<div className="userName">{user.name}</div>
3638
<div className="sub providerId">
39+
{providerId == 'github.com' ? (
40+
<FaGithub />
41+
) : providerId == 'google.com' ? (
42+
<FcGoogle />
43+
) : null}
3744
Connected with <span className="capitalize">{providerName}</span>
3845
</div>
3946
</div>

src/features/settings/components/GeneralSettings/generalSettings.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Select styles
9898

9999
.userContent {
100100
width: auto;
101-
padding: 20px 10px;
101+
padding: 20px 0px;
102102
display: flex;
103103
align-items: center;
104104
border-bottom: 1px solid var(--card-content-divider);
@@ -119,7 +119,18 @@ Select styles
119119
.userContent .userName {
120120
font-weight: 600;
121121
}
122+
122123
.userContent .sub {
123124
font-size: 0.9em;
124125
opacity: 0.9;
125126
}
127+
.userContent .providerId {
128+
font-size: medium;
129+
margin-top: 6px;
130+
display: flex;
131+
align-items: center;
132+
gap: 8px;
133+
}
134+
.userContent .logoutBtn {
135+
margin-left: auto;
136+
}

0 commit comments

Comments
 (0)