diff --git a/public/favicon.ico b/public/favicon.ico index 4570eb8..01a7490 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/src/components/admin/AnnouncementDetail.tsx b/src/components/admin/AnnouncementDetail.tsx index da77222..a9df6b2 100644 --- a/src/components/admin/AnnouncementDetail.tsx +++ b/src/components/admin/AnnouncementDetail.tsx @@ -7,6 +7,9 @@ import { MdModeEditOutline } from "react-icons/md"; import { createMarkup } from "../common/TextEditor"; import Modal from "../common/Modal"; import ProgressIndicator from "../common/ProgressIndicator"; +import "react-quill/dist/quill.bubble.css"; +import dynamic from "next/dynamic"; +const ReactQuill = dynamic(() => import("react-quill"), { ssr: false }); interface AnnouncementDetailProps { announcement: Announcement; @@ -68,7 +71,7 @@ const AnnouncementDetail: React.FC = ({ /> -
+
); }; diff --git a/src/components/auth/AuthImage.tsx b/src/components/auth/AuthImage.tsx index d9227ea..b7a3cc1 100644 --- a/src/components/auth/AuthImage.tsx +++ b/src/components/auth/AuthImage.tsx @@ -20,7 +20,7 @@ const AuthImage = () => { Start making your dreams come true

- Create an account and join africa's digital revolution. + Create an account and join Africa's digital revolution.

diff --git a/src/components/common/TextEditor.tsx b/src/components/common/TextEditor.tsx index 4c81780..c87ec2b 100644 --- a/src/components/common/TextEditor.tsx +++ b/src/components/common/TextEditor.tsx @@ -1,6 +1,5 @@ import "react-quill/dist/quill.snow.css"; import dynamic from "next/dynamic"; -import "react-quill/dist/quill.snow.css"; import DOMPurify from "dompurify"; export const createMarkup = (html: string) => { diff --git a/src/components/contest/OverViewContests.tsx b/src/components/contest/OverViewContests.tsx index eb9991e..9218233 100644 --- a/src/components/contest/OverViewContests.tsx +++ b/src/components/contest/OverViewContests.tsx @@ -38,7 +38,7 @@ const OverViewContests: React.FC = () => { }, { icon: BsArrowRepeat, - title: "current Contest", + title: "Current Contest", number: status?.value.currentContests, }, ]; diff --git a/src/components/layout/NavBar.tsx b/src/components/layout/NavBar.tsx index 7afb893..012b098 100644 --- a/src/components/layout/NavBar.tsx +++ b/src/components/layout/NavBar.tsx @@ -40,6 +40,11 @@ const NavBar: React.FC = () => { to: "/resources", current: false, }, + { + name: "Announcements", + to: "/announcements", + current: false, + }, ], admin: [ { @@ -54,7 +59,7 @@ const NavBar: React.FC = () => { }, { name: "Announcements", - to: "/admin/announcements", + to: "/announcements", current: false, }, { @@ -188,16 +193,16 @@ const NavBar: React.FC = () => {
{isAuthenticated ? ( -
+
logo
) : ( -
+
logo
@@ -222,8 +227,8 @@ const NavBar: React.FC = () => { key={index} href={to} className={classNames( - current ? "text-blue-700" : "text-primary-text", - "text-sm md:text-base" + current ? "text-primary" : "text-primary-text", + "text-sm md:text-base font-medium" )} > {name} @@ -260,7 +265,7 @@ const NavBar: React.FC = () => {
{hasUnreadNotification ? ( - + ) : ( diff --git a/src/components/profile/ProfileCard.tsx b/src/components/profile/ProfileCard.tsx index 43496f1..00d89e7 100644 --- a/src/components/profile/ProfileCard.tsx +++ b/src/components/profile/ProfileCard.tsx @@ -36,7 +36,7 @@ const ProfileCard = () => {
{applicant.profilePicture ? ( profile-picture import("react-quill"), { ssr: false }); interface ResourceProps { selectedChapter: number; @@ -110,7 +113,12 @@ const Resource: React.FC = ({ {chapter ? (

{chapter.title}

-
+ {/*
*/} +
) : (
diff --git a/src/middleware.ts b/src/middleware.ts index eaa3114..ad493cc 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -3,7 +3,7 @@ import { NextRequest } from "next/server"; import { useSelector } from "react-redux"; import { RootState } from "./store"; import { useAppSelector } from "./store/hooks"; -const baseUrl = "https://t-web-project.vercel.app"; +const baseUrl = "http://localhost:3000"; export default function middleware(req: NextRequest) { let verify = req.cookies.get("token"); @@ -12,7 +12,7 @@ export default function middleware(req: NextRequest) { if ( !verify && - (url.includes("/admin/announcements") || + (url.includes("/announcements") || url.includes("/admin/waitlist") || url.includes("/admin/groups") || url.includes("/journey") || diff --git a/src/pages/admin/announcements.tsx b/src/pages/announcements.tsx similarity index 92% rename from src/pages/admin/announcements.tsx rename to src/pages/announcements.tsx index 9d02985..17db96e 100644 --- a/src/pages/admin/announcements.tsx +++ b/src/pages/announcements.tsx @@ -7,6 +7,7 @@ import Error from "<@>/components/common/Error"; import Modal from "<@>/components/common/Modal"; import { useGetAnnouncementsQuery } from "<@>/store/announcement/announcement-api"; import { Announcement } from "<@>/types/admin/Announcement"; +import { getCookie } from "<@>/utils/cookie"; import Head from "next/head"; import React, { useState } from "react"; import { AiOutlinePlus } from "react-icons/ai"; @@ -73,14 +74,16 @@ const index: React.FC = () => {

Announcements

-
diff --git a/src/pages/notifications/index.tsx b/src/pages/notifications/index.tsx index fcb7114..7e292c0 100644 --- a/src/pages/notifications/index.tsx +++ b/src/pages/notifications/index.tsx @@ -58,99 +58,97 @@ const Notifications = () => { // notifications card popup return ( -
-
-

- Notifications -

- {hasUnreadNotification && ( - - )} -
- - {isLoading ? ( -
- {Array(4) - .fill(4) - .map((_item, index) => ( -
-

-

-
-
- -
-
- ))} +
+
+
+

+ Notifications +

+ {hasUnreadNotification && ( + + )}
- ) : ( -
- {notifications && notifications.length != 0 ? ( - notifications.map( - ({ title, content, dateCreated, isRead }, index) => ( - + + ) ) - ) - ) : ( -

- You don't have any notifications. -

- )} -
- )} - {currNotification && ( - { - setCurrNotification(null); - }} - children={ - - } - /> - )} -
+ ) : ( +

+ You don't have any notifications. +

+ )} +
+ )} + {currNotification && ( + { + setCurrNotification(null); + }} + children={ + + } + /> + )} +
+
); };