Skip to content

Commit 89b3cb7

Browse files
committed
Changed the ui of the website
1 parent 764a399 commit 89b3cb7

File tree

7 files changed

+361
-118
lines changed

7 files changed

+361
-118
lines changed

package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
},
1111
"dependencies": {
1212
"@headlessui/react": "^1.7.17",
13+
"@heroicons/react": "^2.1.4",
1314
"@tailwindcss/line-clamp": "^0.4.4",
1415
"animate.css": "^4.1.1",
1516
"autoprefixer": "^10.4.16",
1617
"axios": "^1.4.0",
18+
"bootstrap": "^5.3.3",
19+
"bootstrap-icons": "^1.11.3",
1720
"chart.js": "^4.4.3",
1821
"dotenv": "^16.3.1",
1922
"eslint": "8.46.0",
@@ -34,7 +37,9 @@
3437
"react-transition-group": "^4.4.5",
3538
"sharp": "^0.33.1",
3639
"socket.io-client": "^4.7.5",
37-
"tailwindcss": "^3.3.3"
40+
"tailwind-scrollbar": "^3.1.0",
41+
"tailwindcss": "^3.3.3",
42+
"typewriter-effect": "^2.21.0"
3843
},
3944
"main": "index.js",
4045
"repository": "https://github.com/WaifuAPI/website.git",

public/logo512.png

-13.2 KB
Loading

src/pages/_app.js

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { QueryClient, QueryClientProvider } from "react-query";
33
import { ReactQueryDevtools } from "react-query/devtools";
44
import "tailwindcss/tailwind.css";
55
import "../styles/globals.css";
6+
import "tailwind-scrollbar";
67
import Head from "next/head";
78
import Script from "next/script";
89

src/pages/error.js

+18-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import Link from 'next/link'
2-
import { useEffect } from 'react';
3-
import { toast, ToastContainer } from 'react-toastify';
4-
import 'react-toastify/dist/ReactToastify.css';
1+
import Link from "next/link";
2+
import { useEffect, useState } from "react";
3+
import { toast, ToastContainer } from "react-toastify";
4+
import "react-toastify/dist/ReactToastify.css";
55

66
const ErrorPage = ({ message }) => {
7+
const [theme, setTheme] = useState("dark"); // Default to light theme
8+
79
useEffect(() => {
810
// Display toast notification when component mounts
911
const toastId = toast.error('Click "Re-authenticate" to continue.', {
@@ -17,18 +19,22 @@ const ErrorPage = ({ message }) => {
1719
}, []);
1820

1921
const handleReauthClick = () => {
20-
toast.info('Re-authenticating...', {
22+
toast.info("Re-authenticating...", {
2123
autoClose: 2000,
2224
});
2325

2426
setTimeout(() => {
2527
// Redirect to the dashboard page after waiting
26-
window.location.href = '/dashboard';
28+
window.location.href = "/dashboard";
2729
}, 3000);
2830
};
2931

3032
return (
31-
<div className="flex flex-col items-center justify-center min-h-screen bg-white text-black">
33+
<div
34+
className={`flex flex-col items-center justify-center min-h-screen ${
35+
theme === "dark" ? "bg-gray-900 text-white" : "bg-white text-black"
36+
}`}
37+
>
3238
<p className="text-lg mb-6">{message}</p>
3339
<div className="flex space-x-4 mt-4">
3440
<button
@@ -44,7 +50,11 @@ const ErrorPage = ({ message }) => {
4450
Home
4551
</Link>
4652
</div>
47-
<ToastContainer position="bottom-right" autoClose={3000} />
53+
<ToastContainer
54+
position="bottom-right"
55+
autoClose={3000}
56+
theme={theme === "dark" ? "dark" : "light"}
57+
/>
4858
</div>
4959
);
5060
};

0 commit comments

Comments
 (0)