Skip to content

Commit

Permalink
User Profile Page UI (#3459)
Browse files Browse the repository at this point in the history
Removed Account Creation Date section
  • Loading branch information
MVarshini authored Jun 9, 2023
1 parent 12708ed commit d302664
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 36 deletions.
47 changes: 14 additions & 33 deletions dashboard/src/modules/components/ProfileComponent/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,33 @@ import {
Text,
TextContent,
TextVariants,
isValidDate,
} from "@patternfly/react-core";
import { KeyIcon, UserAltIcon } from "@patternfly/react-icons";

import KeyManagementComponent from "./KeyManagement";
import React from "react";
import { UserAltIcon } from "@patternfly/react-icons";
import avatar from "assets/images/avatar.jpg";
import { useKeycloak } from "@react-keycloak/web";

const ProfileComponent = () => {
const { keycloak } = useKeycloak();

const formatDate = (date) => {
const registerDate = new Date(date);
return isValidDate(registerDate)
? registerDate.toLocaleDateString()
: "----";
};
return (
<div className={"profileDiv"}>
<TextContent>
<Text component={TextVariants.h2}>User Profile</Text>
</TextContent>
<Grid>
<GridItem span={1} />
<GridItem span={10}>
<TextContent>
<Text component={TextVariants.h2}>User Profile</Text>
</TextContent>
</GridItem>
<GridItem span={1} />
</Grid>

<div className="headerDiv">
<Grid hasGutter>
<GridItem span={8}>
<GridItem span={1} />
<GridItem span={10}>
<Card className="card">
<CardBody>
<Level className="levelCard">
Expand Down Expand Up @@ -111,27 +112,7 @@ const ProfileComponent = () => {
<KeyManagementComponent />
</GridItem>
</GridItem>
<GridItem span={4}>
<Card className="card">
<CardBody>
<div className="subHeader settings-wrapper">
<KeyIcon />
<span className="subHeader">Settings</span>
</div>
<Grid>
<GridItem span={12} className="subCardDiv">
<TextContent>
{/* TODO: How to handle account creation date */}
<span>Account creation Date</span>
<Text component={TextVariants.h4}>
{formatDate("MM/DD/YYYY")}
</Text>
</TextContent>
</GridItem>
</Grid>
</CardBody>
</Card>
</GridItem>
<GridItem span={1} />
</Grid>
</div>
</div>
Expand Down
3 changes: 0 additions & 3 deletions dashboard/src/modules/components/ProfileComponent/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@
padding: var(--pf-global--spacer--xs) 0;
}
}
.settings-wrapper {
color: #6a6e73;
}
.item-container {
padding: 2vh 0;
.item-header {
Expand Down

0 comments on commit d302664

Please sign in to comment.