Skip to content

Commit 89c0241

Browse files
authored
Merge pull request #3521 from OpenNeuroOrg/fix/3486-loading-state-search-route
Fix: Display loading spinner on initial search load
2 parents c11f986 + 80f3e85 commit 89c0241

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/openneuro-app/src/scripts/search/search-container.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ const SearchContainer: FC<SearchContainerProps> = ({ portalContent }) => {
139139
])
140140

141141
const { loading, data, fetchMore, variables } = useSearchResults()
142+
142143
const loadMore = () => {
143144
fetchMore({
144145
variables: {

packages/openneuro-app/src/scripts/search/use-search-results.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ export const useSearchResults = () => {
404404
// fetchPolicy is workaround for stuck loading bug (https://github.com/apollographql/react-apollo/issues/3270#issuecomment-579614837)
405405
// TODO: find better solution
406406
fetchPolicy: "cache-and-network",
407-
nextFetchPolicy: "cache-first",
407+
nextFetchPolicy: "cache-and-network",
408408
notifyOnNetworkStatusChange: true,
409409
})
410410
}

0 commit comments

Comments
 (0)