Skip to content

Commit

Permalink
fix: detailed staging display new tabs with green
Browse files Browse the repository at this point in the history
  • Loading branch information
danielstefanequilobe committed Feb 24, 2022
1 parent 26694c8 commit 320545a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 28 deletions.
24 changes: 13 additions & 11 deletions src/components/blocks/DetailedViewStagingTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,19 @@ const DetailedViewTabItem = ({ entry }) => {
<Body size="Bold">
{convertPascalCaseToSentenceCase(entryProp)}
</Body>
<Body
color={
entry[entryProp].changes &&
entry[entryProp].changes.length > 0 &&
entry[entryProp].changes.some(x => x !== null)
? '#f5222d'
: '#000000'
}
>
{entry[entryProp].original ? entry[entryProp].original : '--'}
</Body>
{entry[entryProp].original && (
<Body
color={
entry[entryProp].changes &&
entry[entryProp].changes.length > 0 &&
entry[entryProp].changes.some(x => x !== null)
? '#f5222d'
: '#000000'
}
>
{entry[entryProp].original}
</Body>
)}
{entry[entryProp].changes &&
entry[entryProp].changes.length > 0 &&
entry[entryProp].changes.some(x => x !== null) &&
Expand Down
17 changes: 2 additions & 15 deletions src/navigation/AppNavigator.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import React, { Suspense, useEffect } from 'react';
import React, { Suspense } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { useIntl } from 'react-intl';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import { IndeterminateProgressOverlay, Dashboard } from '../components/';
import { resetRefreshPrompt } from '../store/actions/app';
import * as Pages from '../pages';
import history from './history';

import {
AppContainer,
Expand All @@ -28,23 +27,11 @@ const AppNavigator = () => {
pendingError,
} = useSelector(store => store.app);

// FINISH SETTING UP BUG FIX
useEffect(() => {
window.setTimeout(() => {
console.log('history reload', history.location);

const reloadToUrl = history.location.pathname
? `${history.location.pathname}${history.location.search}`
: '/';
history.push(reloadToUrl);
}, 2000);
}, []);

return (
<AppContainer>
{updateAvailablePleaseRefesh && (
<UpdateRefreshContainer
onRefresh={() => history.push(`${history.path}${history.search}`)}
onRefresh={() => window.location.reload()}
onClose={() => dispatch(resetRefreshPrompt)}
/>
)}
Expand Down
2 changes: 0 additions & 2 deletions src/navigation/history.js

This file was deleted.

0 comments on commit 320545a

Please sign in to comment.