From 99082efbdb799640f495fba11abc736cc60408b3 Mon Sep 17 00:00:00 2001 From: "Kemas M. Aryadary Rasyad" <112590882+aryadary0706@users.noreply.github.com> Date: Thu, 16 Jul 2026 12:05:50 +0700 Subject: [PATCH] feat: enhance routing and UI components for intern and mentor sections --- src/App.tsx | 11 ++- src/Layout/Footer-Internify.tsx | 98 +++++++++++-------- src/Layout/Header-internify.tsx | 15 ++- src/Layout/Navbar.tsx | 2 +- .../intern/components/SidebarIntern.tsx | 2 +- .../components/SubmissionStatusTable.tsx | 2 +- .../internify/mentor/BaseProjectsPage.tsx | 15 ++- .../mentor/components/CreateProjectDialog.tsx | 2 +- 8 files changed, 90 insertions(+), 57 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index cee8be6..dd549c9 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,5 @@ import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; +import { lazy, Suspense } from "react"; import { Toaster } from "react-hot-toast"; import Landing from "./Pages/Landing"; import AboutUs from "./Pages/AboutUs"; @@ -56,6 +57,10 @@ import NotFoundPage from "./Pages/NotFoundPage"; import InternCertificateDetail from "./Pages/Internify/intern/InternCertDetail"; import VerificationCert from "./Pages/Internify/VerificationCert"; +const InternCertificatePage = lazy(() => import("./Pages/Internify/intern/InternCertDetail")); +const MentorCertForm = lazy(() => import("./Pages/Internify/mentor/CertificateForm")); +const MentorCertResult = lazy(() => import("./Pages/Internify/mentor/CertificateResult")); + function App() { return ( <> @@ -111,7 +116,7 @@ function App() { } /> } /> } /> - } /> + } /> } /> } /> } /> @@ -126,8 +131,8 @@ function App() { } /> } /> } /> - } /> - } /> + } /> + } /> } /> } /> } /> diff --git a/src/Layout/Footer-Internify.tsx b/src/Layout/Footer-Internify.tsx index d77dc05..e42432f 100644 --- a/src/Layout/Footer-Internify.tsx +++ b/src/Layout/Footer-Internify.tsx @@ -1,35 +1,36 @@ -import { useNavigate } from 'react-router-dom'; +import { Link } from 'react-router-dom'; import { FaInstagram, FaLinkedin, FaRegEnvelope } from "react-icons/fa"; -import logoHumic from "../assets/logo.png" +import logoHumic from "../assets/logo.png"; -const footerLinks = { - Internship: [ - { label: "Beranda", path: "/" }, - { label: "Tentang", path: "/about-us" }, - { label: "Life At Humic", path: "/our-developer" }, - ], - External: [ - { label: "Humic Website", path: "https://humic.telkomuniversity.ac.id/" }, - { label: "Our Activity", path: "/activity" }, - { label: "Life At Humic", path: "/life-humic" }, - { label: "Our Developer", path: "/developer" }, - ], -}; +const internshipLinks = [ + { label: "Beranda", path: "/" }, + { label: "Tentang", path: "/about-us" }, + { label: "Life At Humic", path: "/our-developer" }, +]; + +const externalLinks = [ + { label: "Humic Website", href: "https://humic.telkomuniversity.ac.id/" }, + { label: "Our Activity", href: "https://humic.telkomuniversity.ac.id/humicinmedia/" }, + { label: "Life At Humic", href: "#" }, + { label: "Our Developer", href: "#" }, +]; const socials = [ { label: "Instagram", icon: FaInstagram, href: "https://www.instagram.com/humicengineering/" }, { label: "LinkedIn", icon: FaLinkedin, href: "https://www.linkedin.com/company/humic-engineering/" }, - { label: "Email", icon: FaRegEnvelope, href: "https://humic.telkomuniversity.ac.id/" }, + { label: "Email", icon: FaRegEnvelope, href: "#" }, ]; - export function FooterIntern() { - const navigate = useNavigate(); - return (
{/* Brand info */} -
+
+ logo humic
Gedung Kultubai Selatan, Blok F Jl. Telekomunikasi, Terusan Buah Batu Bandung @@ -53,32 +54,43 @@ export function FooterIntern() { {/* Link columns */}
- {Object.entries(footerLinks).map(([title, links]) => ( -
-

{title}

-
    - {links.map(({ label, path }) => ( -
  • - -
  • - ))} -
-
- ))} +
+

Internship

+
    + {internshipLinks.map(({ label, path }) => ( +
  • + + {label} + +
  • + ))} +
+
+ +
+

Eksternal

+
    + {externalLinks.map(({ label, href }) => ( +
  • + + {label} + +
  • + ))} +
+
- logo humic
); } +export default FooterIntern; -export default FooterIntern diff --git a/src/Layout/Header-internify.tsx b/src/Layout/Header-internify.tsx index 58768ae..5dab15f 100644 --- a/src/Layout/Header-internify.tsx +++ b/src/Layout/Header-internify.tsx @@ -1,5 +1,5 @@ import { Bell, Menu } from "lucide-react" -import { useState } from "react"; +import { useEffect, useState } from "react"; import humiclogo from "../assets/logo.png"; import { useNavigate } from "react-router-dom"; import { useCurrentUser, resolveFileUrl, getInitials } from "../hooks/useUser"; @@ -11,6 +11,11 @@ export default function Header({ toggleSidebar }: { toggleSidebar: () => void }) const [imageError, setImageError] = useState(false); const { unreadCount } = useNotifications(); const photoUrl = resolveFileUrl(user?.profile_picture); + + useEffect(() => { + setImageError(false); + }, [photoUrl]); + const displayName = user?.full_name?.trim() || [user?.nama_depan, user?.nama_belakang].filter(Boolean).join(" ") || ""; const initials = getInitials(displayName); @@ -27,7 +32,7 @@ export default function Header({ toggleSidebar }: { toggleSidebar: () => void }) @@ -35,7 +40,7 @@ export default function Header({ toggleSidebar }: { toggleSidebar: () => void }) @@ -46,8 +51,8 @@ export default function Header({ toggleSidebar }: { toggleSidebar: () => void }) > {hasPhoto ? ( {user?.full_name setImageError(true)} /> diff --git a/src/Layout/Navbar.tsx b/src/Layout/Navbar.tsx index f9533ed..1164627 100644 --- a/src/Layout/Navbar.tsx +++ b/src/Layout/Navbar.tsx @@ -82,7 +82,7 @@ const Navbar = () => { }} className="block w-full text-left hover:text-red-600 transition" > - Internify + Portal LMS diff --git a/src/Pages/internify/intern/components/SidebarIntern.tsx b/src/Pages/internify/intern/components/SidebarIntern.tsx index 3c245f5..04a8194 100644 --- a/src/Pages/internify/intern/components/SidebarIntern.tsx +++ b/src/Pages/internify/intern/components/SidebarIntern.tsx @@ -93,7 +93,7 @@ export default function SidebarIntern({ isOpen, closeSidebar }: SidebarProps) { PREFERENCES