Skip to content

Commit

Permalink
navigation should not use useCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
aahvocado committed Mar 6, 2023
1 parent 6c6d484 commit be2339e
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useContext } from 'react';
import React, { useContext } from 'react';
import { makeStyles, createStyles } from '@material-ui/core';

import FormStateContext from 'contexts/FormStateContext';
Expand Down Expand Up @@ -43,21 +43,21 @@ export default function FlowNavigation({
const backBtnTheme =
appTheme === 'dark' ? 'transparent-on-dark' : 'transparent-on-light';

const handleBack = useCallback(() => {
const handleBack = () => {
if (onBack) {
onBack();
} else {
goBackStep();
}
}, []);
};

const handleNext = useCallback(() => {
const handleNext = () => {
if (onNext) {
onNext();
} else {
goNextStep();
}
}, []);
};

return (
<div className={utilityClasses.buttonContainer}>
Expand Down

0 comments on commit be2339e

Please sign in to comment.