Skip to content

Commit

Permalink
review: claire's review
Browse files Browse the repository at this point in the history
  • Loading branch information
maximeperrault authored and maximeperraultdev committed Sep 18, 2024
1 parent c4e0e35 commit 9dfaf04
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
5 changes: 1 addition & 4 deletions frontend/src/domain/entities/map/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,10 @@ export enum DistanceUnit {
}

export enum MapToolType {
DASHBOARD = 'DASHBOARD',
FILTERS = 'FILTERS',
INTEREST_POINT = 'INTEREST_POINT',
MEASUREMENT = 'MEASUREMENT',
MEASUREMENT_MENU = 'MEASUREMENT_MENU',
VESSEL_LABELS = 'VESSEL_LABELS',
VESSEL_VISIBILITY = 'VESSEL_VISIBILITY'
MEASUREMENT_MENU = 'MEASUREMENT_MENU'
}

export enum OLGeometryType {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/domain/shared_slices/Global.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// TODO This slice should disappear in favor of `features/MainWindow/slice.ts` and "Map" feature should have its own slice.
// TODO "Map" feature should have its own slice where we would transfer the related `display...` props.

import { isDashboardEnabled } from '@features/missions/MissionForm/utils'
import { isDashboardEnabled } from '@features/Dashboard/utils'
import { createSelector, createSlice, type PayloadAction } from '@reduxjs/toolkit'

import type { MapToolType } from '../entities/map/constants'
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/features/Dashboard/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { isCypress } from '@utils/isCypress'

export const isDashboardEnabled = () =>
isCypress()
? window.Cypress.env('CYPRESS_FRONTEND_DASHBOARD') === 'true'
: import.meta.env.FRONTEND_DASHBOARD_ENABLED === 'true'
4 changes: 0 additions & 4 deletions frontend/src/features/missions/MissionForm/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ export const isMissionAutoUpdateEnabled = () =>
isCypress()
? window.Cypress.env('CYPRESS_MISSION_FORM_AUTO_UPDATE') === 'true'
: import.meta.env.FRONTEND_MISSION_FORM_AUTO_UPDATE === 'true'
export const isDashboardEnabled = () =>
isCypress()
? window.Cypress.env('CYPRESS_FRONTEND_DASHBOARD') === 'true'
: import.meta.env.FRONTEND_DASHBOARD_ENABLED === 'true'

/**
* should a Formik `onChange` event trigger `saveMission`.
Expand Down

0 comments on commit 9dfaf04

Please sign in to comment.