-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* added progress bar on profile page, issue #63 * removed unnecessary css styles for progress bar * updated progress bar consecutive steps * modified progress bar, reduced width, removed progress bar in mobile view * removed unused imported objects * reverted temporary changes * resolved conflict
- Loading branch information
1 parent
7b7cb0e
commit 46e54ee
Showing
5 changed files
with
176 additions
and
94 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,4 +80,4 @@ | |
"prettier": "^1.19.1", | ||
"pretty-quick": "^2.0.1" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import React from 'react' | ||
import { Steps, Progress } from 'antd'; | ||
const { Step } = Steps; | ||
|
||
const UserProgress = ({ data, type }) => { | ||
console.log(data); | ||
const { about, skills, linkedin, github, facebook } = data; | ||
|
||
const progress = [ | ||
about, skills, github, linkedin, facebook | ||
] | ||
|
||
let progressVal = 0; | ||
for (let i = 0; i < 5; i++) { | ||
const ele = progress[i]; | ||
console.log(ele); | ||
if (ele !== "" && ele !== "https://github.com/" && ele !== "https://linkedin.com/in/" && ele !== "https://facebook.com/") | ||
progressVal++; | ||
else | ||
break; | ||
} | ||
return ( | ||
<div style={type === "mobile" ? { marginTop: "10px" } : {}}> | ||
<h3>Profile Strength</h3> | ||
{ | ||
(type === "mobile") ? | ||
(<> | ||
<Steps | ||
direction="vertical" | ||
current={progressVal}> | ||
|
||
<Step title="About" /> | ||
<Step title="Skills" /> | ||
<Step title="Github" /> | ||
<Step title="LinkedIn" /> | ||
<Step title="Facebook" /> | ||
</Steps> | ||
</>) : | ||
( | ||
<> | ||
<Steps | ||
current={progressVal} | ||
style={{ width: "80%" }} | ||
> | ||
|
||
<Step title="About" /> | ||
<Step title="Skills" /> | ||
<Step title="Github" /> | ||
<Step title="LinkedIn" /> | ||
<Step title="Facebook" /> | ||
|
||
</Steps> | ||
<Progress | ||
strokeColor={{ | ||
'0%': '#108ee9', | ||
'100%': '#87d068', | ||
}} | ||
style={{ | ||
width: "80%" | ||
}} | ||
percent={progressVal * 20} | ||
/> | ||
</> | ||
) | ||
} | ||
</div> | ||
); | ||
} | ||
|
||
export default UserProgress; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -204,6 +204,9 @@ | |
} | ||
|
||
@media only screen and (max-width: 768px) { | ||
|
||
|
||
|
||
.mobileProfile { | ||
display: block; | ||
} | ||
|