Skip to content

Commit

Permalink
added server down screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajeet1606 committed Jul 28, 2024
1 parent ced90e2 commit 04a5147
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>Roast Github</title>
</head>
<body>
<div id="root"></div>
Expand Down
6 changes: 4 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import "./App.css";
import Footer from "./components/Footer";
import Main from "./components/Main";
// import Main from "./components/Main";
import Navbar from "./components/Navbar";
import ServerDown from "./components/ServerDown";

function App() {
return (
<>
<div className="h-[100vh] w-full font-montserrat flex flex-col justify-between">
<Navbar />
<Main />
{/* <Main /> */}
<ServerDown />
<Footer />
</div>
</>
Expand Down
1 change: 1 addition & 0 deletions src/components/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const Main = () => {
} catch (error) {
// console.error("Error calling Gemini API:", error);
setErrorMessage("An error occurred. Please try again later.");
setRoastMessage("");
return error;
}
}
Expand Down
13 changes: 13 additions & 0 deletions src/components/ServerDown.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const ServerDown = () => {
return (
<div className="w-10/12 md:w-1/2 flex flex-col justify-center mx-auto text-red-600">
<h1 className="text-center">
Sorry for the inconvenience, we've hit the limits of Gemini API quota,
we'll be back soon, once it's fixed. Please come back after some time.
</h1>
<h1 className="text-center">Thank you for your patience!!</h1>
</div>
);
};

export default ServerDown;

0 comments on commit 04a5147

Please sign in to comment.