Add ErrorBoundaries to Home
This commit is contained in:
3 files changed
+366
-266
No files matched your search
+5
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user