From 2efbd0afea43a45a98d941b4d543c5d375d9213b Mon Sep 17 00:00:00 2001 From: devinleighsmith Date: Wed, 8 Nov 2023 15:11:57 -0800 Subject: [PATCH] psp-7209 do not display acquisition file until all loading state is complete and context is initialized. --- .../mapSideBar/acquisition/AcquisitionContainer.tsx | 7 ++++++- .../features/mapSideBar/acquisition/AcquisitionView.tsx | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/frontend/src/features/mapSideBar/acquisition/AcquisitionContainer.tsx b/source/frontend/src/features/mapSideBar/acquisition/AcquisitionContainer.tsx index fea457b7c5..ee909c77fd 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/AcquisitionContainer.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/AcquisitionContainer.tsx @@ -275,7 +275,12 @@ export const AcquisitionContainer: React.FunctionComponent; } diff --git a/source/frontend/src/features/mapSideBar/acquisition/AcquisitionView.tsx b/source/frontend/src/features/mapSideBar/acquisition/AcquisitionView.tsx index 99491944d6..1a04eef284 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/AcquisitionView.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/AcquisitionView.tsx @@ -76,9 +76,6 @@ export const AcquisitionView: React.FunctionComponent = ( const history = useHistory(); const match = useRouteMatch(); const { file, lastUpdatedBy } = useContext(SideBarContext); - if (!!file && file?.fileType !== FileTypes.Acquisition) { - throw Error('Context file is not an acquisition file'); - } const acquisitionFile: Api_AcquisitionFile = file as Api_AcquisitionFile; // match for property menu routes - eg /property/1/ltsa