From e4f157cd9894f8dfd23c79bdd1e9990860b4292e Mon Sep 17 00:00:00 2001 From: lionick <44701697+lionick@users.noreply.github.com> Date: Tue, 10 Oct 2023 13:49:25 +0300 Subject: [PATCH] Don't refresh Communities page when on focus, Fix wrong redirect at endpoints (#20) * dont refresh Communities page when on focus * remove reduntant '/' from endpoint urls --- app/routers/communities.py | 4 ++-- javascript/src/Pages/Communities/index.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/routers/communities.py b/app/routers/communities.py index 83047e9..b072caa 100644 --- a/app/routers/communities.py +++ b/app/routers/communities.py @@ -43,7 +43,7 @@ async def read_min_date_communities( WHERE tenenv_id={0} """.format(tenenv_id)).one() return min_date -@router.get("/members_bystatus/") +@router.get("/members_bystatus") async def read_members_bystatus( *, session: Session = Depends(get_session), @@ -107,7 +107,7 @@ async def read_communities( return communities -@router.get("/communities/") +@router.get("/communities") async def read_community( *, session: Session = Depends(get_session), diff --git a/javascript/src/Pages/Communities/index.js b/javascript/src/Pages/Communities/index.js index e9e43f7..cf6fd93 100644 --- a/javascript/src/Pages/Communities/index.js +++ b/javascript/src/Pages/Communities/index.js @@ -25,6 +25,7 @@ const Communities = () => { [tenenvKey, {tenantId: tenant, environment: environment}], getTenenv, { retry: 0, + refetchOnWindowFocus: false }) useEffect(() => {