From 94f80e4eda0133e7d7af1bc8cc8cbde8aabbd464 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Wed, 5 Aug 2026 18:36:35 +0700 Subject: [PATCH] fix(dimentorin): homepage kosong akibat duplikat page route - hapus apps/dimentorin/src/app/page.tsx (hanya Navbar+div kosong) yg menang conflict / - aktifkan (public)/(home) yg berisi 5 section (Hero, WhatWeOffer, Testimonial, FAQ, CTA) - tambah navigasi onClick tombol CTA: hero & CTA -> /mentoring/ai-agent, /mentoring --- .../app/(public)/(home)/_components/cta-section.tsx | 4 ++++ .../app/(public)/(home)/_components/hero-section.tsx | 3 +++ apps/dimentorin/src/app/page.tsx | 12 ------------ 3 files changed, 7 insertions(+), 12 deletions(-) delete mode 100644 apps/dimentorin/src/app/page.tsx diff --git a/apps/dimentorin/src/app/(public)/(home)/_components/cta-section.tsx b/apps/dimentorin/src/app/(public)/(home)/_components/cta-section.tsx index 65e0f6b..34be04e 100644 --- a/apps/dimentorin/src/app/(public)/(home)/_components/cta-section.tsx +++ b/apps/dimentorin/src/app/(public)/(home)/_components/cta-section.tsx @@ -2,8 +2,10 @@ import { Button } from '@imphnen-frontend-service/ui/atoms'; import { cn } from '@imphnen-frontend-service/utils'; import { FC, useRef } from 'react'; import { motion, useInView, Variants } from 'framer-motion'; +import { useNavigate } from 'react-router-dom'; export const CTASection: FC = () => { + const navigate = useNavigate(); const ref = useRef(null) const isInView = useInView(ref, { once: true, amount: 0.2 }) @@ -137,6 +139,7 @@ export const CTASection: FC = () => { @@ -144,6 +147,7 @@ export const CTASection: FC = () => { type="button" variant="secondary" className="w-full h-auto py-2 text-[10px] font-medium md:w-max md:text-sm md:px-2.5 md:font-semibold lg:text-base" + onClick={() => navigate('/mentoring')} > Temukan Mentor diff --git a/apps/dimentorin/src/app/(public)/(home)/_components/hero-section.tsx b/apps/dimentorin/src/app/(public)/(home)/_components/hero-section.tsx index 7721db0..e32ca87 100644 --- a/apps/dimentorin/src/app/(public)/(home)/_components/hero-section.tsx +++ b/apps/dimentorin/src/app/(public)/(home)/_components/hero-section.tsx @@ -1,7 +1,9 @@ import { Button } from "@imphnen-frontend-service/ui/atoms"; import { motion } from 'framer-motion' +import { useNavigate } from 'react-router-dom'; export function HeroSection() { + const navigate = useNavigate(); return (
{/* Background gradients and shapes */} @@ -63,6 +65,7 @@ export function HeroSection() { type="button" size="sm" className="text-[10px] h-auto px-2.5 py-2 md:text-sm" + onClick={() => navigate('/mentoring/ai-agent')} > Belajar Dengan AI Sekarang diff --git a/apps/dimentorin/src/app/page.tsx b/apps/dimentorin/src/app/page.tsx deleted file mode 100644 index 77801dc..0000000 --- a/apps/dimentorin/src/app/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { Navbar } from '@imphnen-frontend-service/ui/organisms'; -import { FC, ReactElement } from 'react'; - -export const Components: FC = (): ReactElement => { - return ( -
- -
- ); -}; - -export default Components;