Skip to content

Commit

Permalink
loaded project tabs to used for setting navigation after save.
Browse files Browse the repository at this point in the history
  • Loading branch information
matbusby-fw committed Oct 17, 2024
1 parent 594ed87 commit a30280c
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ import {
AMS_STATUS_CODES_SUCCESS,
AMS_STATUS_CODE_FAIL,
AMS_ENVIRONMENTAL_MANAGEMENT_ACT_TYPES,
SystemFlagEnum,
} from "@mds/common";
import { useFeatureFlag } from "@mds/common/providers/featureFlags/useFeatureFlag";
import { fetchRegions } from "@mds/common/redux/slices/regionsSlice";
import { getSystemFlag } from "@mds/common/redux/selectors/authenticationSelectors";

interface IParams {
mineGuid?: string;
Expand All @@ -51,6 +53,8 @@ export const ProjectSummaryPage = () => {
const dispatch = useDispatch();
const history = useHistory();
const location = useLocation();
const systemFlag = useSelector(getSystemFlag);
const isCore = systemFlag === SystemFlagEnum.core;

const { mineGuid, projectGuid, projectSummaryGuid, tab } = useParams<IParams>();
const anyTouched = useSelector(
Expand All @@ -71,7 +75,11 @@ export const ProjectSummaryPage = () => {
: mine?.mine_guid === mineGuid;
const [isLoaded, setIsLoaded] = useState(isDefaultLoaded);
const [isEditMode, setIsEditMode] = useState(isDefaultEditMode);
const projectFormTabs = null;
const projectFormTabs = getProjectFormTabs(
amsFeatureEnabled,
isCore,
isFeatureEnabled(Feature.MAJOR_PROJECT_REFACTOR)
);
const activeTab = tab ?? projectFormTabs[0];

const handleFetchData = async () => {
Expand Down

0 comments on commit a30280c

Please sign in to comment.