Refactor and update project components for Next.js 15 compatibility (#6)

* refactor: update all modules to latest version

* refactor: update layout to match nextjs 15 convention

* fix: implement TopProgressBar as Client

* fix: remove unnecessary locale prop

* fix: update postcss.config.js export

* fix: comment out styles

* fix: ref usage in useIntersectionObserver and update Navbar

* chore: performance optimizations

* fix: simplify Loading component structure

* refactor: move ProjectCard component and add prop types validation
This commit is contained in:
Alvalen Shafel 2025-03-18 12:39:32 +07:00 • committed by GitHub
parent 481bc8324e
commit 7f0c142dda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 3422 additions and 2569 deletions

View file

@ -17,13 +17,15 @@ export function useIntersectionObserver() {
}
);
if (ref.current) {
observer.observe(ref.current);
const currentRef = ref.current; // Store the ref value in a variable
if (currentRef) {
observer.observe(currentRef);
}
return () => {
if (ref.current) {
observer.unobserve(ref.current);
if (currentRef) {
observer.unobserve(currentRef);
}
};
}, []);

View file

@ -1,7 +1,7 @@
import Footer from "@/components/Footer";
export const metadata = {
title: "Alvalens | About",
title: "Alvalens | About"
};
export default function Layout({ children }) {
return (

View file

@ -1,11 +1,7 @@
export default function Loading() {
return (
<>
(
<div className="fixed top-0 left-0 flex justify-center items-center h-screen w-screen bg-gray-300 z-[999]">
<h1 className="text-4xl text-gray-900">Loading...</h1>
</div>
)
</>
<div className="fixed top-0 left-0 flex justify-center items-center h-screen w-screen bg-gray-300 z-[999]">
<h1 className="text-4xl text-gray-900">Loading...</h1>
</div>
);
}