+ {registry && registry.length > 0 ? (
+
+ ) : (
+ No data available to display
+ )}
);
};
diff --git a/src/redux/neurojson/neurojson.action.ts b/src/redux/neurojson/neurojson.action.ts
index e038591..9e33fb8 100644
--- a/src/redux/neurojson/neurojson.action.ts
+++ b/src/redux/neurojson/neurojson.action.ts
@@ -11,7 +11,6 @@ export const fetchRegistry = createAsyncThunk(
"neurojson/fetchRegistry",
async () => {
const response = await NeurojsonService.getRegistry();
- console.log(response);
return response.database;
}
);
diff --git a/src/redux/neurojson/neurojson.slice.ts b/src/redux/neurojson/neurojson.slice.ts
index 543cd0a..23e5593 100644
--- a/src/redux/neurojson/neurojson.slice.ts
+++ b/src/redux/neurojson/neurojson.slice.ts
@@ -1,5 +1,6 @@
import {
fetchDocumentDetails,
+ fetchRegistry,
loadAllDocuments,
loadPaginatedData,
} from "./neurojson.action";
@@ -96,6 +97,17 @@ const neurojsonSlice = createSlice({
.addCase(fetchDocumentDetails.rejected, (state, action) => {
state.loading = false;
state.error = action.payload as string;
+ })
+ .addCase(fetchRegistry.fulfilled, (state, action: PayloadAction