@@ -10,32 +10,33 @@ import {
1010 Text ,
1111 TextContent ,
1212 TextVariants ,
13- isValidDate ,
1413} from "@patternfly/react-core" ;
15- import { KeyIcon , UserAltIcon } from "@patternfly/react-icons" ;
1614
1715import KeyManagementComponent from "./KeyManagement" ;
1816import React from "react" ;
17+ import { UserAltIcon } from "@patternfly/react-icons" ;
1918import avatar from "assets/images/avatar.jpg" ;
2019import { useKeycloak } from "@react-keycloak/web" ;
2120
2221const ProfileComponent = ( ) => {
2322 const { keycloak } = useKeycloak ( ) ;
2423
25- const formatDate = ( date ) => {
26- const registerDate = new Date ( date ) ;
27- return isValidDate ( registerDate )
28- ? registerDate . toLocaleDateString ( )
29- : "----" ;
30- } ;
3124 return (
3225 < div className = { "profileDiv" } >
33- < TextContent >
34- < Text component = { TextVariants . h2 } > User Profile</ Text >
35- </ TextContent >
26+ < Grid >
27+ < GridItem span = { 1 } />
28+ < GridItem span = { 10 } >
29+ < TextContent >
30+ < Text component = { TextVariants . h2 } > User Profile</ Text >
31+ </ TextContent >
32+ </ GridItem >
33+ < GridItem span = { 1 } />
34+ </ Grid >
35+
3636 < div className = "headerDiv" >
3737 < Grid hasGutter >
38- < GridItem span = { 8 } >
38+ < GridItem span = { 1 } />
39+ < GridItem span = { 10 } >
3940 < Card className = "card" >
4041 < CardBody >
4142 < Level className = "levelCard" >
@@ -111,27 +112,7 @@ const ProfileComponent = () => {
111112 < KeyManagementComponent />
112113 </ GridItem >
113114 </ GridItem >
114- < GridItem span = { 4 } >
115- < Card className = "card" >
116- < CardBody >
117- < div className = "subHeader settings-wrapper" >
118- < KeyIcon />
119- < span className = "subHeader" > Settings</ span >
120- </ div >
121- < Grid >
122- < GridItem span = { 12 } className = "subCardDiv" >
123- < TextContent >
124- { /* TODO: How to handle account creation date */ }
125- < span > Account creation Date</ span >
126- < Text component = { TextVariants . h4 } >
127- { formatDate ( "MM/DD/YYYY" ) }
128- </ Text >
129- </ TextContent >
130- </ GridItem >
131- </ Grid >
132- </ CardBody >
133- </ Card >
134- </ GridItem >
115+ < GridItem span = { 1 } />
135116 </ Grid >
136117 </ div >
137118 </ div >
0 commit comments