Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[N/A]: removes env environmental to display cost surfaces #1565

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions app/layout/project/navigation/hooks.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { useRouter } from 'next/router';

import { useFeatureFlags } from 'hooks/feature-flags';

import BLM_CALIBRATION_SVG from 'svgs/navigation/blm-calibration.svg?sprite';
import COST_SURFACE_SVG from 'svgs/navigation/cost-surface.svg?sprite';
import FEATURES_SVG from 'svgs/navigation/features.svg?sprite';
Expand All @@ -16,7 +14,6 @@ import type { SubMenuItem } from './submenu';
const SCENARIO_ROUTE = '/projects/[pid]/scenarios/';

export const useInventoryItems = (): SubMenuItem[] => {
const { showCS } = useFeatureFlags();
const { query, route } = useRouter();
const { pid, tab } = query as { pid: string; tab: string };
const isProjectRoute = route.startsWith('/projects/[pid]') && !route.includes('/scenarios');
Expand All @@ -28,16 +25,12 @@ export const useInventoryItems = (): SubMenuItem[] => {
icon: PROTECTED_AREA_SVG,
selected: isProjectRoute && tab === TABS['project-protected-areas'],
},
...(showCS
? [
{
name: 'Cost surface',
route: `/projects/${pid}?tab=${TABS['project-cost-surface']}`,
icon: COST_SURFACE_SVG,
selected: isProjectRoute && tab === TABS['project-cost-surface'],
},
]
: []),
{
name: 'Cost surface',
route: `/projects/${pid}?tab=${TABS['project-cost-surface']}`,
icon: COST_SURFACE_SVG,
selected: isProjectRoute && tab === TABS['project-cost-surface'],
},
{
name: 'Features',
route: `/projects/${pid}?tab=${TABS['project-features']}`,
Expand Down
Loading