File tree Expand file tree Collapse file tree
src/components/Layout/SettingsLayout Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React from 'react'
22import 'react-contexify/dist/ReactContexify.css'
33import { NavLink , Outlet } from 'react-router-dom'
4+ import { auth } from '../../../features/auth/api/Config'
45import './settings.css'
56
7+ const UserInfo = ( ) => {
8+ const userInfo = auth . currentUser
9+ return (
10+ < div className = "userCard" >
11+ { userInfo ?. photoURL && < img src = { userInfo . photoURL } className = "userImage" > </ img > }
12+ < div className = "userInfos" >
13+ < div className = "userName" > { userInfo ?. displayName } </ div >
14+ < div className = "userEmail" > { userInfo ?. email } </ div >
15+ </ div >
16+ </ div >
17+ )
18+ }
19+
620export const SettingsLayout = ( ) => {
721 const navigation = [
822 {
@@ -28,6 +42,7 @@ export const SettingsLayout = () => {
2842 ]
2943 return (
3044 < div className = "settings" >
45+ < UserInfo />
3146 < div className = "horizontalTabsLayout" >
3247 < nav className = "navigation" >
3348 { navigation . map ( ( item ) => {
Original file line number Diff line number Diff line change 4040 border-right : 4px solid var (--horizontal-tabs-layout-active-color );
4141 font-weight : bold;
4242}
43+ .userCard {
44+ width : auto;
45+ background-color : var (--placeholder-background-color );
46+ padding : 10px ;
47+ margin : 10px ;
48+ border-radius : 20px ;
49+ display : flex;
50+ align-items : center;
51+ }
52+ .userImage {
53+ width : 60px ;
54+ height : 60px ;
55+ border-radius : 20% ;
56+ }
57+ .userInfos {
58+ width : auto;
59+ margin-left : 10px ;
60+ }
61+ .userName {
62+ font-size : larger;
63+ font-weight : 600 ;
64+ }
65+ .userEmail {
66+ font-size : medium;
67+ margin-top : 6px ;
68+ }
4369
4470@media only screen and (max-width : 768px ) {
4571 .horizontalTabsLayout {
You can’t perform that action at this time.
0 commit comments