Skip to content

Commit

Permalink
Merge pull request #1201 from hackforla/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
sydneywalcoff authored Mar 7, 2024
2 parents a5dd8af + 1f4668a commit f161fb4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion products/statement-generator/src/components/FormHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useContext } from 'react';
import { useLocation } from 'react-router-dom';
import { Theme, makeStyles, createStyles } from '@material-ui/core';

import RoutingContext from 'contexts/RoutingContext';
Expand Down Expand Up @@ -127,6 +128,10 @@ const FormHeader = () => {
formState: { involvement },
} = useContext(FormStateContext);

const location = useLocation();
const isFormRoute =
location.pathname.startsWith('/form/') || location.pathname === '/form';

const isFrozen = currentStep === AppUrl.Involvement;

const stepNum = convertStepToNum(currentStep, involvement);
Expand Down Expand Up @@ -174,7 +179,7 @@ const FormHeader = () => {

const formTitle = getSectionTitle(currentStep);

if (stepNum === 0) {
if (!isFormRoute || stepNum === 0) {
return null;
}

Expand Down

0 comments on commit f161fb4

Please sign in to comment.