Skip to content

Commit bac1133

Browse files
updated the student dashboard page
1 parent f50d04c commit bac1133

File tree

1 file changed

+20
-41
lines changed

1 file changed

+20
-41
lines changed

client/src/Pages/Home.jsx

+20-41
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { useEffect, useState } from "react";
2-
import {Modal , Button} from "flowbite-react";
2+
import { Modal, Button } from "flowbite-react";
33
import { useNavigate, Link } from "react-router-dom";
44
import { useCookies } from "react-cookie";
5-
import { HiOutlineExclamationCircle } from 'react-icons/hi';
5+
import { HiOutlineExclamationCircle } from "react-icons/hi";
66
import axios from "axios";
77
import { useContext } from "react";
88
import { AuthContext } from "../Components/Auth/AuthContext";
@@ -226,46 +226,30 @@ const Home = () => {
226226
)}
227227
</ul>
228228
</div>
229-
</div>
229+
</div>
230230
) : (
231231
<div>
232232
<h3 className="text-2xl text-white ml-6 mt-10 font-bold mb-2">
233233
Student Perks:
234234
</h3>
235235
<ul className="list-none pl-6 w-full md:w-3/5 list-inside">
236-
<div className=" flex justify-start items-center my-1 rounded-t-lg p-4 h-auto w-auto bg-blue-200 ">
237-
<li className="text-black text-lg ">
238-
Choose elective subjects
239-
</li>
240-
</div>
241-
<div className=" flex justify-start items-center my-1 p-4 h-auto w-auto bg-blue-200 ">
242-
<li className="text-black text-lg ">
243-
Access limited routes
244-
</li>
245-
</div>
246-
<div className=" flex justify-start items-center my-1 rounded-b-lg p-4 h-auto w-auto bg-blue-200 ">
247-
<li className="text-black text-lg ">
248-
View selected subjects
249-
</li>
236+
<div className=" flex justify-start items-center my-1 rounded-t-lg p-4 h-auto w-auto bg-blue-200 hover:bg-blue-400">
237+
<Link
238+
to="/subject"
239+
className="text-black hover:text-white text-lg"
240+
>
241+
Choose Elective Subjects
242+
</Link>
250243
</div>
251244
</ul>
252245
</div>
253246
)}
254-
<div className="h-auto mt-16 text-xl w-full">
255-
<li className="text-white flex justify-start underline underline-offset-2 items-center list-none ">
256-
<img src="student_Home.png" className="h-6 w-6 mr-2" />{" "}
257-
<Link to="/student"> Student Home</Link>
258-
</li>
259-
<li className="text-white flex justify-start underline underline-offset-2 items-center list-none ">
260-
<img src="books.png" className="h-6 w-6 mr-2" />{" "}
261-
<Link to="/subject">Elective Subjects</Link>
262-
</li>
263-
</div>
247+
264248
<button
265249
className="bg-red-400 text-white rounded px-4 py-2 mt-6"
266250
onClick={() => {
267-
setModal(true);
268-
}}
251+
setModal(true);
252+
}}
269253
>
270254
Logout
271255
</button>
@@ -275,24 +259,19 @@ const Home = () => {
275259
<img src="wlcmbg.png" className="w-full hidden md:block mr-36" />
276260
</div>
277261
<BackToTopButton />
278-
<Modal
279-
show={showmodal}
280-
onClose={() => setModal(false)}
281-
popup
282-
size='md'
283-
>
262+
<Modal show={showmodal} onClose={() => setModal(false)} popup size="md">
284263
<Modal.Header />
285264
<Modal.Body>
286-
<div className='text-center'>
287-
<HiOutlineExclamationCircle className='h-14 w-14 text-gray-400 dark:text-gray-200 mb-4 mx-auto' />
288-
<h3 className='mb-5 text-lg text-gray-500 dark:text-gray-400'>
265+
<div className="text-center">
266+
<HiOutlineExclamationCircle className="h-14 w-14 text-gray-400 dark:text-gray-200 mb-4 mx-auto" />
267+
<h3 className="mb-5 text-lg text-gray-500 dark:text-gray-400">
289268
Are you sure you want to SignOut?
290269
</h3>
291-
<div className='flex justify-center gap-4'>
292-
<Button color='failure' onClick={handleLogout}>
270+
<div className="flex justify-center gap-4">
271+
<Button color="failure" onClick={handleLogout}>
293272
Yes, I'm sure
294273
</Button>
295-
<Button color='gray' onClick={() => setModal(false)}>
274+
<Button color="gray" onClick={() => setModal(false)}>
296275
No, cancel
297276
</Button>
298277
</div>

0 commit comments

Comments
 (0)