Skip to content

Commit

Permalink
fixed show blue on all 100% nu just public state, fix update State on…
Browse files Browse the repository at this point in the history
… change without refresh
  • Loading branch information
Alex Medesan committed Dec 17, 2020
1 parent bad1456 commit 90a3795
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ProgressWorkflow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const ProgressWorkflow = (props) => {
const [workflowProgressSteps, setWorkflowProgressSteps] = useState([]);
const [currentState, setCurrentState] = useState(null);
const workflowProgress = useSelector((state) => state?.workflowProgress);
const thestate = useSelector((state) => state);

// toggle progress component visible by clicking on the button
const setVisibleSide = () => {
Expand Down Expand Up @@ -63,7 +62,7 @@ const ProgressWorkflow = (props) => {

useEffect(() => {
dispatch(getWorkflowProgress(pathname)); // the are paths that don't have workflow (home, login etc)
}, [dispatch, pathname]);
}, [dispatch, pathname, content]);

const itemTracker = (tracker) => (
<li
Expand Down Expand Up @@ -106,6 +105,8 @@ const ProgressWorkflow = (props) => {
className={`circle-right-btn ${
currentStateClass[currentStateKey]
? `review-state-${currentStateKey}`
: currentState.done === 100
? 'review-state-published'
: ''
}`}
id="toolbar-cut-blocks"
Expand All @@ -127,6 +128,8 @@ const ProgressWorkflow = (props) => {
className={`review-state-text ${
currentStateClass[currentStateKey]
? `review-state-${currentStateKey}`
: currentState.done === 100
? 'review-state-published'
: ''
}`}
>
Expand Down

0 comments on commit 90a3795

Please sign in to comment.