Update all hooks (Projects, Tasks, Certificates), implement backend for Projects. HomePage on Mentors

This commit is contained in:
Kemas M. Aryadary Rasyad
2026-06-26 10:59:35 +07:00
parent 2e162bfc1e
commit 53b270921d
34 changed files with 895 additions and 625 deletions
+7 -7
View File
@@ -34,7 +34,7 @@ export default function InternifyLogin() {
try {
setLoading(true);
const response = await api.post("/auth-api/login", { email, password });
console.log(response.data.data)
const { token } = response.data.data;
document.cookie = `token=${token}; path=/; SameSite=Strict`;
@@ -42,7 +42,7 @@ export default function InternifyLogin() {
const role = decoded?.role;
if (role === "intern") {
navigate("/intern");
} else if (role === "admin") {
} else if (role === "mentor" || role === "admin") {
navigate("/mentor");
} else {
setError("Role user tidak dikenali.");
@@ -59,7 +59,7 @@ export default function InternifyLogin() {
};
return (
<div className="min-h-screen bg-gray-100 flex flex-col justify-between items-center py-8 px-4 font-sans selection:bg-red-200">
<div className="min-h-screen bg-background flex flex-col justify-between items-center py-8 px-4 font-sans selection:bg-red-foreground">
<div className="hidden md:block"></div>
<div className="w-full max-w-[440px] flex flex-col items-center">
@@ -72,7 +72,7 @@ export default function InternifyLogin() {
</p>
</div>
<div className="max-w-md bg-white rounded-2xl border border-gray-100 p-8 md:p-12">
<div className="max-w-md bg-white rounded-2xl border border-box-border p-8 md:p-12">
<h2 className="text-xl font-bold text-gray-900 mb-1">Welcome back</h2>
<p className="text-sm text-gray-500 mb-6">Access your dashboard with your credentials.</p>
@@ -147,14 +147,14 @@ export default function InternifyLogin() {
<div className="mt-1">
<div className="relative flex py-2 items-center">
<div className="flex-grow border-t border-gray-100"></div>
<span className="flex-shrink mx-4 text-[10px] font-bold tracking-wider text-gray-400 uppercase">
<span className="flex-shrink mx-4 text-[10px] font-bold tracking-wider text-font-shade uppercase">
SUPPORT
</span>
<div className="flex-grow border-t border-gray-100"></div>
</div>
<button className="w-full mt-2 flex items-center justify-center gap-2 border border-gray-200 rounded-full py-1.5 text-xs text-gray-600 hover:bg-gray-50 transition-colors font-medium">
<svg className="w-3.5 h-3.5 text-gray-400" fill="none" stroke="currentColor" strokeWidth="2" viewBox="0 0 24 24">
<button className="w-full mt-2 flex items-center justify-center gap-2 border border-gray-200 rounded-full py-1.5 text-xs text-font-shade hover:bg-gray-50 transition-colors font-medium">
<svg className="w-3.5 h-3.5 text-font-shade" fill="none" stroke="currentColor" strokeWidth="2" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
Frequently Asked Questions