From 8364d1735380403ad7f5884e0859cca4797a0662 Mon Sep 17 00:00:00 2001 From: Nathan Franklin Date: Mon, 11 Nov 2024 18:36:22 -0600 Subject: [PATCH] Rename isPublic to isPublicView for clarity --- react/src/AppRouter.tsx | 2 +- .../components/AssetsPanel/AssetsPanel.tsx | 10 ++++----- .../FeatureFileTree/FeatureFileTree.test.tsx | 6 ++--- .../FeatureFileTree/FeatureFileTree.tsx | 6 ++--- .../ManageMapProjectModal.tsx | 6 ++--- .../MapProjectNavBar.test.tsx | 4 ++-- .../MapProjectNavBar/MapProjectNavBar.tsx | 6 ++--- react/src/hooks/features/useFeatures.ts | 9 ++++---- react/src/hooks/projects/useProjects.ts | 6 ++--- react/src/hooks/tileServers/useTileServers.ts | 8 +++---- react/src/pages/MapProject/MapProject.tsx | 22 +++++++++---------- 11 files changed, 43 insertions(+), 42 deletions(-) diff --git a/react/src/AppRouter.tsx b/react/src/AppRouter.tsx index dab56191..5fe9e83b 100644 --- a/react/src/AppRouter.tsx +++ b/react/src/AppRouter.tsx @@ -65,7 +65,7 @@ function AppRouter() { } /> - } /> + } /> } /> = ({ - isPublic, + isPublicView, featureCollection, projectId, }) => { @@ -81,8 +81,8 @@ const AssetsPanel: React.FC = ({
diff --git a/react/src/components/FeatureFileTree/FeatureFileTree.test.tsx b/react/src/components/FeatureFileTree/FeatureFileTree.test.tsx index acf52002..9f9b40f1 100644 --- a/react/src/components/FeatureFileTree/FeatureFileTree.test.tsx +++ b/react/src/components/FeatureFileTree/FeatureFileTree.test.tsx @@ -26,7 +26,7 @@ const renderWithRouter = (ui: React.ReactElement, { route = '/' } = {}) => { describe('FeatureFileTree', () => { const defaultProps = { featureCollection: featureCollection, - isPublic: false, + isPublicView: false, projectId: 1, }; @@ -73,7 +73,7 @@ describe('FeatureFileTree', () => { it('does not show delete button for public projects', () => { const { queryByTestId } = renderWithRouter( - , + , { route: '/?selectedFeature=1' } ); @@ -84,7 +84,7 @@ describe('FeatureFileTree', () => { it('does not show delete button when no feature is selected', () => { const { queryByTestId } = renderWithRouter( - + ); // Verify delete button is not present diff --git a/react/src/components/FeatureFileTree/FeatureFileTree.tsx b/react/src/components/FeatureFileTree/FeatureFileTree.tsx index 1652597f..c41d17a0 100644 --- a/react/src/components/FeatureFileTree/FeatureFileTree.tsx +++ b/react/src/components/FeatureFileTree/FeatureFileTree.tsx @@ -31,7 +31,7 @@ interface FeatureFileTreeProps { /** * Whether or not the map project is public. */ - isPublic: boolean; + isPublicView: boolean; /** * active project id @@ -44,7 +44,7 @@ interface FeatureFileTreeProps { */ const FeatureFileTree: React.FC = ({ featureCollection, - isPublic, + isPublicView, projectId, }) => { const { mutate: deleteFeature, isLoading } = useDeleteFeature(); @@ -169,7 +169,7 @@ const FeatureFileTree: React.FC = ({ )} {featureNode.name} - {!isPublic && isSelected && ( + {!isPublicView && isSelected && (