Skip to content

Commit

Permalink
Revert "isDown true heck"
Browse files Browse the repository at this point in the history
This reverts commit 2326589.
  • Loading branch information
prtkjakhar committed Mar 21, 2024
1 parent 2326589 commit c749827
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions apps/amakrushi/src/components/LoginPage/LoginPage.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import styles from "./login.module.css";
import { NumberInput, NumberInputField, Spinner } from "@chakra-ui/react";
import React, { useState, useEffect, useContext } from "react";
import React, { useState, useEffect } from "react";
import { useRouter } from "next/router";
import { useLocalization } from "../../hooks/useLocalization";
import { logEvent } from "firebase/analytics";
import { analytics } from "../../utils/firebase";
import toast from "react-hot-toast";
import { AppContext } from "../../context";
import DownTimePage from "../down-time-page";
const LoginPage: React.FC = () => {
const context = useContext(AppContext);
const router = useRouter();
const [input, setInput] = useState("");
const [loading, setLoading] = useState(false);
Expand Down Expand Up @@ -60,10 +57,9 @@ const LoginPage: React.FC = () => {
useEffect(() => {
//@ts-ignore
logEvent(analytics, "Login_page");
context?.fetchIsDown();
}, []);

return context?.isDown ? <DownTimePage /> : (
return (
<div className={`${styles.main}`}>
<div className={styles.title}>{t("label.title")}</div>

Expand Down
2 changes: 1 addition & 1 deletion apps/amakrushi/src/context/ContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ const ContextProvider: FC<{
const status = res.data.status;
console.log('hie', status);
if (status === 'OK') {
setIsDown(true);
setIsDown(false);
} else {
setIsDown(true);
console.log('Server status is not OK');
Expand Down

0 comments on commit c749827

Please sign in to comment.