commit 81698b9a075be9682c4f9576fd9b2cbfe6136fe4
Author: Vaclav Honzik <vaclavhonzik98@gmail.com>
Date:   Mon May 16 10:28:03 2022 +0200

    merge fixes

diff --git a/frontend/src/features/Catalog/CatalogItemDetail.tsx b/frontend/src/features/Catalog/CatalogItemDetail.tsx
index 763d721..b987827 100644
--- a/frontend/src/features/Catalog/CatalogItemDetail.tsx
+++ b/frontend/src/features/Catalog/CatalogItemDetail.tsx
@@ -100,7 +100,8 @@ const CatalogItemDetail: FunctionComponent<CatalogItemDetailProps> = ({
         },
         {
             rowName: 'Coordinates',
-            items: item?.longitude && item?.latitude ? `${item?.latitude}°, ${item?.longitude}°` : '-, -',
+            // Must be in array otherwise the string gets iterated
+            items: [item?.longitude && item?.latitude ? `${item?.latitude}°, ${item?.longitude}°` : '-'],
         },
         {
             rowName: 'Certainty',
diff --git a/frontend/src/features/Catalog/CatalogTable.tsx b/frontend/src/features/Catalog/CatalogTable.tsx
index 898bfbe..e34d730 100644
--- a/frontend/src/features/Catalog/CatalogTable.tsx
+++ b/frontend/src/features/Catalog/CatalogTable.tsx
@@ -113,7 +113,7 @@ const CatalogTable = () => {
                     {item.name}
                 </Link>
             </TableCell>
-            {mapValueOrDefault(item.alternativeNames?.join(', '), {
+            {mapValueOrDefault(item.allNames?.join(', '), {
                 display: '-webkit-box',
                 overflow: 'hidden',
                 WebkitBoxOrient: 'vertical',
diff --git a/frontend/src/features/Navigation/navigationSlice.tsx b/frontend/src/features/Navigation/navigationSlice.tsx
index 33a46b0..6096557 100644
--- a/frontend/src/features/Navigation/navigationSlice.tsx
+++ b/frontend/src/features/Navigation/navigationSlice.tsx
@@ -12,7 +12,7 @@ const persistConfig = {
     storage
 }
 
-const initialState = {
+const initialState: NavigationState = {
     selectedMenuItem: '',
     open: false
 }
@@ -21,8 +21,8 @@ export const navigationSlice = createSlice({
     name: 'navigation',
     initialState,
     reducers: {
-        setSelectedMenuItem: (state, action) => ({...state, selectedMenuItem: action.payload}),
-        setOpen: (state, action) => ({...state, open: action.payload}),
+        setSelectedMenuItem: (state: NavigationState, action: any) => ({...state, selectedMenuItem: action.payload}),
+        setOpen: (state: NavigationState, action: any) => ({...state, open: action.payload}),
     }
 })
 
diff --git a/frontend/src/features/TrackingTool/trackingToolSlice.ts b/frontend/src/features/TrackingTool/trackingToolSlice.ts
index 58ab388..856bb43 100644
--- a/frontend/src/features/TrackingTool/trackingToolSlice.ts
+++ b/frontend/src/features/TrackingTool/trackingToolSlice.ts
@@ -17,8 +17,12 @@ export interface TrackingToolState {
     activePaths: Set<number> // indices of the active paths
     // trigger to close the dialog when API call is finished
     dialogApiCallSuccess: boolean
+    pathsPerPage: number // max number of paths to show on the map at once
+    currentPage: number // current page of paths - starts from 0
 }
 
+const defaultPathsPerPage = 5
+
 const initialState: TrackingToolState = {
     isLoading: false,
     mapCenter: [
@@ -28,6 +32,8 @@ const initialState: TrackingToolState = {
     primaryPathIdx: 0,
     activePaths: new Set(),
     dialogApiCallSuccess: true,
+    pathsPerPage: defaultPathsPerPage,
+    currentPage: 0,
 }
 
 // Returns tuple of average latitude and longitude
@@ -56,7 +62,11 @@ export const trackingToolSlice = createSlice({
             ...state,
             dialogApiCallSuccess: false,
         }),
-        clear: (state: TrackingToolState) => ({...initialState})
+        setPage: (state: TrackingToolState, action: any) => ({
+            ...state,
+            currentPage: action.payload,
+        }),
+        clear: () => ({...initialState})
     },
     extraReducers: (builder) => {
         builder.addCase(sendTextForProcessing.fulfilled, (state, action) => {
@@ -75,6 +85,7 @@ export const trackingToolSlice = createSlice({
                         : (state.mapCenter as LatLngTuple),
                 isLoading: false,
                 dialogApiCallSuccess: true,
+                currentPage: 0,
             }
         })
         builder.addCase(sendTextForProcessing.rejected, (state, action) => ({
@@ -82,6 +93,7 @@ export const trackingToolSlice = createSlice({
             lastError: action.error.message,
             isLoading: false,
             dialogApiCallSuccess: false,
+            currentPage: 0,
         }))
         builder.addCase(sendTextForProcessing.pending, (state) => {
             return {
