Add ErrorBoundaries to Home

This commit is contained in:
Prayag Prajapati committed 2023-09-22 11:18:46 +05:30
1 parent db9a0411d0
commit 69660b1d10
3 files changed
+366 -266

No files matched your search

+5 -1
View File
@@ -173,7 +173,7 @@ function App() {
const usersAvailable = async () => {
const users = await getUserApi(window.api).getPublicUsers();
if (users.data.length >= 1) {
if (users.status == 200 || users.data.length >= 1) {
return true;
} else {
return false;
@@ -280,6 +280,10 @@ function App() {
const location = useLocation();
useEffect(() => {
window.scrollTo(0, 0);
}, [location.key]);
if (!window.api) {
serverAvailable().then((available) => {
if (available) {