From 5a05ab509cd7e4142c5fff4f2e510c3b2b409ca1 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Mon, 2 Jan 2023 21:09:56 -0500 Subject: [PATCH] forward progress --- README.md | 4 ++++ frontend/src/Call/call-data.js | 2 +- frontend/src/features/api/apiSlice.js | 5 +++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ba8488e..d290fde 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,10 @@ yarn start This should build the frontend and open a browser. In order to have all the cookies work correctly, you have to use the same domain name. Make sure you have setup the local domains as described above. Then goto the base domain, for me that is openmhz.test, at port 3000 `openmhz.test:3000` +## Upgrading a "Frontend" server + +https://create-react-app.dev/docs/updating-to-new-releases/ + ## Managing MongoDB diff --git a/frontend/src/Call/call-data.js b/frontend/src/Call/call-data.js index 34e79d1..ecd7e6d 100644 --- a/frontend/src/Call/call-data.js +++ b/frontend/src/Call/call-data.js @@ -31,7 +31,7 @@ export const Groups = (args) => { export const Calls = (args) => { - const { data, isError, isLoading, isSuccess,error } = useGetCallsQuery(args.shortName); + const { data, isError, isLoading, isSuccess,error } = useGetCallsQuery({shortName: args.shortName}); let content diff --git a/frontend/src/features/api/apiSlice.js b/frontend/src/features/api/apiSlice.js index 4b5e77b..461b3cf 100644 --- a/frontend/src/features/api/apiSlice.js +++ b/frontend/src/features/api/apiSlice.js @@ -27,9 +27,10 @@ export const apiSlice = createApi({ }), getCalls: builder.query({ // The URL for the request is '/fakeApi/posts' - query: (shortName) => ({ + query: ({shortName,filterType=0,filterCode=0}) => ({ url: `/${shortName}/calls`, - method: "GET" //, params: { filterType, filterCode }, + method: "GET", + params: { filterType, filterCode }, }) }) })