diff --git a/admin/inertia/pages/settings/maps.tsx b/admin/inertia/pages/settings/maps.tsx
index d411b39..220ed41 100644
--- a/admin/inertia/pages/settings/maps.tsx
+++ b/admin/inertia/pages/settings/maps.tsx
@@ -6,7 +6,7 @@ import { useModals } from '~/context/ModalContext'
import StyledModal from '~/components/StyledModal'
import { FileEntry } from '../../../types/files'
import { useNotifications } from '~/context/NotificationContext'
-import { useEffect, useState } from 'react'
+import { useState } from 'react'
import api from '~/lib/api'
import DownloadURLModal from '~/components/DownloadURLModal'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
@@ -161,28 +161,17 @@ export default function MapsManager(props: {
)
}
- const fetchLatestCollections = useMutation({
- mutationFn: () => api.fetchLatestMapCollections(),
+ const refreshManifests = useMutation({
+ mutationFn: () => api.refreshManifests(),
onSuccess: () => {
addNotification({
- message: 'Successfully fetched the latest map collections.',
+ message: 'Successfully refreshed map collections.',
type: 'success',
})
queryClient.invalidateQueries({ queryKey: [CURATED_COLLECTIONS_KEY] })
},
})
- // Auto-fetch latest collections if the list is empty
- useEffect(() => {
- if (
- curatedCollections &&
- curatedCollections.length === 0 &&
- !fetchLatestCollections.isPending
- ) {
- fetchLatestCollections.mutate()
- }
- }, [curatedCollections, fetchLatestCollections])
-
return (