diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 391f3ed..1acf97b 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -1,18 +1,33 @@
-import React from "react";
+import React, { useState } from "react";
import Header from "./components/Header";
import Footer from "./components/Footer";
import MultiForm from "./components/MultiForm";
import { Toaster } from "react-hot-toast";
+import Circles from "./components/Circles";
+import hero from "./assets/hero-img.png";
+import Modal from "./components/Modal";
const App: React.FC = () => {
+ const [openModal, setOpenModal] = useState(false);
return (
<>
+
+
+
+
+
+
+
+ {openModal && }
-
-
-
-
-
>
);
};
diff --git a/frontend/src/AppContext/AppContext.tsx b/frontend/src/AppContext/AppContext.tsx
index 68f1d43..e171cb4 100644
--- a/frontend/src/AppContext/AppContext.tsx
+++ b/frontend/src/AppContext/AppContext.tsx
@@ -22,12 +22,12 @@ interface IContext {
}
const DEFAULT_USER: IUser = {
- rollNo: "",
+ rollNo: sessionStorage.getItem("rollNo") || "",
password: "",
securityQuestion: "",
securityAnswer: "",
- ssoToken: sessionStorage.getItem("ssoToken"),
- sessionToken: sessionStorage.getItem("sessionToken"),
+ ssoToken: sessionStorage.getItem("ssoToken") || "",
+ sessionToken: sessionStorage.getItem("sessionToken") || "",
};
export const AppContext = createContext(null);
@@ -35,7 +35,7 @@ export const AppContext = createContext(null);
export const AppProvider: React.FC = ({ children }) => {
const [authState, setAuth] = useState({
user: DEFAULT_USER,
- currentStep: 0,
+ currentStep: DEFAULT_USER.ssoToken ? 2 : 0,
});
const logout = () => {
diff --git a/frontend/src/assets/header-logo.png b/frontend/src/assets/header-logo.png
deleted file mode 100644
index be67cbe..0000000
Binary files a/frontend/src/assets/header-logo.png and /dev/null differ
diff --git a/frontend/src/assets/hero-img.png b/frontend/src/assets/hero-img.png
new file mode 100644
index 0000000..b9d01e8
Binary files /dev/null and b/frontend/src/assets/hero-img.png differ
diff --git a/frontend/src/assets/logo.jpg b/frontend/src/assets/logo.jpg
deleted file mode 100644
index a1769cb..0000000
Binary files a/frontend/src/assets/logo.jpg and /dev/null differ
diff --git a/frontend/src/assets/metakgp-logo-header.png b/frontend/src/assets/metakgp-logo-header.png
deleted file mode 100644
index 7e285d0..0000000
Binary files a/frontend/src/assets/metakgp-logo-header.png and /dev/null differ
diff --git a/frontend/src/assets/metakgp-logo-white.png b/frontend/src/assets/metakgp-logo-white.png
deleted file mode 100644
index 1c7cec4..0000000
Binary files a/frontend/src/assets/metakgp-logo-white.png and /dev/null differ
diff --git a/frontend/src/assets/metakgp-logo.png b/frontend/src/assets/metakgp-logo.png
index ac03c57..ecca495 100644
Binary files a/frontend/src/assets/metakgp-logo.png and b/frontend/src/assets/metakgp-logo.png differ
diff --git a/frontend/src/components/Circles.tsx b/frontend/src/components/Circles.tsx
new file mode 100644
index 0000000..a10edab
--- /dev/null
+++ b/frontend/src/components/Circles.tsx
@@ -0,0 +1,41 @@
+import React from "react";
+
+let circles_list = [
+ {
+ position: [10, 15],
+ color: "0 0 400px 140px rgba(0, 133, 255, 1)",
+ },
+ {
+ position: [10, 90],
+ color: "0 0 100px 100px rgba(0, 255, 102, 0.72)",
+ },
+ { position: [40, 40], color: "0 0 150px 100px #FFD447" },
+ {
+ position: [100, 10],
+ color: "0 0 250px 150px rgba(204, 0, 255, 0.75)",
+ },
+ {
+ position: [80, 90],
+ color: "0 0 200px 80px rgba(204, 0, 255, 1)",
+ },
+];
+
+const Circles: React.FC = () => {
+ return (
+
+ {circles_list.map((x) => (
+ <>
+
+ >
+ ))}
+
+ );
+};
+export default Circles;
diff --git a/frontend/src/components/Electives.tsx b/frontend/src/components/Electives.tsx
index 80953d6..0a7f8f2 100644
--- a/frontend/src/components/Electives.tsx
+++ b/frontend/src/components/Electives.tsx
@@ -1,14 +1,21 @@
-import React from "react";
+import React, { useState } from "react";
import { BACKEND_URL } from "./url";
import { toast } from "react-hot-toast";
import { useAppContext } from "../AppContext/AppContext";
+import Spinner from "./Spinner";
const Electives: React.FC = () => {
const { user } = useAppContext();
-
+ const [isBreadthDownloading, setIsBreadthDownloading] = useState(false);
+ const [isDepthDownloading, setIsDepthDownloading] = useState(false);
const getElective = async (elective: string) => {
const formData = new URLSearchParams();
formData.append("roll_number", user.rollNo);
+ {
+ elective == "breadth"
+ ? setIsBreadthDownloading(true)
+ : setIsDepthDownloading(true);
+ }
try {
const res = await fetch(`${BACKEND_URL}/elective/${elective}`, {
@@ -38,39 +45,37 @@ const Electives: React.FC = () => {
} catch (error) {
toast.error(`Error fetching ${elective} electives!`);
console.error("Error fetching breadth electives:", error);
+ } finally {
+ {
+ elective == "breadth"
+ ? setIsBreadthDownloading(false)
+ : setIsDepthDownloading(false);
+ }
}
};
return (
Download Electives
+
+ Below are the filtered electives that are available as per your
+ slots
+
-
-
Breadth
-
- Click download to save the excel file for available
- breadth electives.
-
-
-
-
-
Depth
-
- Click download to save the excel file for available
- depth electives.
-
-
-
+
+
);
diff --git a/frontend/src/components/Footer.tsx b/frontend/src/components/Footer.tsx
index 4fc5696..c4073a6 100644
--- a/frontend/src/components/Footer.tsx
+++ b/frontend/src/components/Footer.tsx
@@ -1,10 +1,23 @@
import React from "react";
-import About from "./About";
+import { useAppContext } from "../AppContext/AppContext";
+type props = {
+ openModal: React.Dispatch>;
+};
+const Footer: React.FC = ({ openModal }) => {
+ const { logout, user } = useAppContext();
-const Footer: React.FC = () => {
return (
-
+
+
+ {user.ssoToken && (
+
+ )}
+