Skip to content

Commit

Permalink
VV3 hotfixes (#2892)
Browse files Browse the repository at this point in the history
  • Loading branch information
j8seangel authored Oct 24, 2024
2 parents 9d28d33 + 65e15bf commit d6e6e69
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion apps/fishing-map/features/map/controls/MapControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
selectIsAnyReportLocation,
selectIsWorkspaceLocation,
selectIsMapDrawing,
selectIsVesselGroupReportLocation,
} from 'routes/routes.selectors'
import { useDownloadDomElementAsImage } from 'hooks/screen.hooks'
import { setInlineStyles, cleantInlineStyles } from 'utils/dom'
Expand Down Expand Up @@ -70,10 +71,12 @@ const MapControls = ({
const isWorkspaceLocation = useSelector(selectIsWorkspaceLocation)
const isVesselLocation = useSelector(selectIsAnyVesselLocation)
const reportLocation = useSelector(selectIsAnyReportLocation)
const isVesselGroupReportLocation = useSelector(selectIsVesselGroupReportLocation)
const isMapDrawing = useSelector(selectIsMapDrawing)
const { isErrorNotificationEditing, toggleErrorNotification } = useMapErrorNotification()
const showExtendedControls =
(isWorkspaceLocation || isVesselLocation || reportLocation) && !isMapDrawing
(isWorkspaceLocation || isVesselLocation || reportLocation || isVesselGroupReportLocation) &&
!isMapDrawing
const showScreenshot = !isVesselLocation && !reportLocation
const rootElement = useRootElement()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ export const fetchVesselGroupsThunk = createAsyncThunk<
const vesselGroupsParams = {
...DEFAULT_PAGINATION_PARAMS,
cache: false,
// 'logged-user': true,
...(ids?.length && { ids }),
...(ids?.length ? { ids } : { 'logged-user': true }),
}
const url = `/vessel-groups?${stringify(vesselGroupsParams)}`
const vesselGroups = await GFWAPI.fetch<APIPagination<VesselGroup>>(url, { cache: 'reload' })
Expand Down
2 changes: 2 additions & 0 deletions apps/fishing-map/features/vessel/areas/VesselAreas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { TrackCategory, trackEvent } from 'features/app/analytics.hooks'
import { selectVesselProfileColor } from 'features/dataviews/selectors/dataviews.instances.selectors'
import { useMapFitBounds } from 'features/map/map-bounds.hooks'
import { useDebouncedDispatchHighlightedEvent } from 'features/map/map-interactions.hooks'
import { useFetchRegionsData } from 'features/vessel/activity/event/event.hook'
import { useVesselProfileEventsLoading } from '../vessel-events.hooks'
import { VesselAreaSubsection } from '../vessel.types'
import styles from './VesselAreas.module.css'
Expand Down Expand Up @@ -98,6 +99,7 @@ const AreaTooltip = ({ payload }: any) => {
}

const VesselAreas = ({ updateAreaLayersVisibility }: VesselAreasProps) => {
useFetchRegionsData()
const { t } = useTranslation()
const { dispatchQueryParams } = useLocationConnect()
const events = useSelector(selectVesselEventsFilteredByTimerange)
Expand Down

0 comments on commit d6e6e69

Please sign in to comment.