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

VV3 hotfixes #2892

Merged
merged 3 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
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
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
Loading