File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,14 @@ const App = () => {
5858 width : '300px' ,
5959 }
6060
61- // Always allow access to admin page, regardless of database status
62- const isAdminRoute = window . location . pathname === "/admin"
61+ const isExemptRoute = ( ) => {
62+ const path = window . location . pathname
63+ return path === "/admin" ||
64+ path === "/summary"
65+ }
6366
6467 const checkDbStatus = useCallback ( async ( ) => {
65- // Don't continuously check database status if on admin page
66- if ( isAdminRoute ) {
68+ if ( isExemptRoute ( ) ) {
6769 setAppReady ( true )
6870 return
6971 }
@@ -80,13 +82,13 @@ const App = () => {
8082 checkDbStatus ( )
8183 } , 1000 )
8284 }
83- } , [ isAdminRoute ] )
85+ } , [ ] )
8486
8587 useEffect ( ( ) => {
8688 checkDbStatus ( )
8789 } , [ checkDbStatus ] )
8890
89- if ( appReady || isAdminRoute ) {
91+ if ( appReady || isExemptRoute ( ) ) {
9092 return (
9193 < Router >
9294 < div >
You can’t perform that action at this time.
0 commit comments