()
| 46 | ); |
| 47 | }; |
| 48 | function App() { |
| 49 | const [isloading, setIsLoading] = useState(true); |
| 50 | useEffect(() => { |
| 51 | // initialize creds |
| 52 | const id = process.env.REACT_APP_APPID ?? "opensign"; |
| 53 | localStorage.setItem("parseAppId", id); |
| 54 | localStorage.setItem("baseUrl", `${serverUrl_fn()}/`); |
| 55 | hideUpgradeProgress(); |
| 56 | localStorage.removeItem("showUpgradeProgress"); |
| 57 | setIsLoading(false); |
| 58 | }, []); |
| 59 | |
| 60 | return ( |
| 61 | <div className="bg-base-200"> |
| 62 | {isloading ? ( |
| 63 | <AppLoader /> |
| 64 | ) : ( |
| 65 | <BrowserRouter> |
| 66 | <Title /> |
| 67 | <Routes> |
| 68 | <Route element={<ValidateRoute />}> |
| 69 | <Route exact path="/" element={<Lazy Page={Login} />} /> |
| 70 | <Route path="/addadmin" element={<Lazy Page={AddAdmin} />} /> |
| 71 | <Route |
| 72 | path="/upgrade-2.1" |
| 73 | element={<Lazy Page={UpdateExistUserAdmin} />} |
| 74 | /> |
| 75 | </Route> |
| 76 | <Route element={<Validate />}> |
| 77 | <Route |
| 78 | exact |
| 79 | path="/load/recipientSignPdf/:docId/:contactBookId" |
| 80 | element={<DragProvider Page={PdfRequestFiles} />} |
| 81 | /> |
| 82 | </Route> |
| 83 | <Route |
| 84 | path="/login/:base64url" |
| 85 | element={<Lazy Page={GuestLogin} />} |
| 86 | /> |
| 87 | <Route path="/debugpdf" element={<Lazy Page={DebugPdf} />} /> |
| 88 | <Route |
| 89 | path="/forgetpassword" |
| 90 | element={<Lazy Page={ForgetPassword} />} |
| 91 | /> |
| 92 | <Route element={<HomeLayout />}> |
| 93 | <Route path="/users" element={<UserList />} /> |
| 94 | <Route |
| 95 | path="/changepassword" |
| 96 | element={<Lazy Page={ChangePassword} />} |
| 97 | /> |
| 98 | <Route path="/form/:id" element={<Form />} /> |
| 99 | <Route path="/report/:id" element={<Report />} /> |
| 100 | <Route path="/dashboard/:id" element={<Dashboard />} /> |
| 101 | <Route path="/profile" element={<Lazy Page={UserProfile} />} /> |
| 102 | <Route path="/drive" element={<Lazy Page={Opensigndrive} />} /> |
| 103 | <Route path="/managesign" element={<Lazy Page={ManageSign} />} /> |
| 104 | <Route |
| 105 | path="/template/:templateId" |
nothing calls this directly
no test coverage detected