Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Commit

Permalink
feat(ErrorLogger): pass navigation function to clauses - I17
Browse files Browse the repository at this point in the history
Signed-off-by: irmerk <[email protected]>
  • Loading branch information
jolanglinais committed Aug 6, 2019
1 parent 5c1efd1 commit 1327f0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ErrorLogger/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as actions from './actions';
import * as styles from './styles';

const ErrorLogger = (props) => {
const { errors } = props;
const { errors, errorNav } = props;

const [errorsVisible, setErrorsVisible] = useState(false);
const [specErrorVisible, setspecErrorVisible] = useState(false);
Expand All @@ -29,9 +29,8 @@ const ErrorLogger = (props) => {
key={actions.keySwitchCase(soloError)}>

<styles.ArrowDiv expanded={specErrorVisible} onClick={handleClickSpecError}/>

<styles.ErrorFile
onClick={() => console.log('soloError: ', soloError.clauseId)}>
onClick={() => errorNav(soloError)}>
{actions.typeSwitchCase(soloError)}
</styles.ErrorFile>

Expand Down Expand Up @@ -69,6 +68,7 @@ const ErrorLogger = (props) => {

ErrorLogger.propTypes = {
errors: PropTypes.array.isRequired,
errorNav: PropTypes.func,
};

export default ErrorLogger;

0 comments on commit 1327f0c

Please sign in to comment.