feat(ui): complete phase 4 Poyraz UI foundation

This commit is contained in:
poyrazavsever
2026-07-16 23:20:30 +03:00
parent 5d863280bf
commit 561af11b70
58 changed files with 2555 additions and 7806 deletions
+3 -7
View File
@@ -4,7 +4,6 @@ import { Loader2 } from "lucide-react";
import Link, { type LinkProps } from "next/link";
import { usePathname } from "next/navigation";
import {
useEffect,
useState,
type AnchorHTMLAttributes,
type MouseEvent,
@@ -33,11 +32,8 @@ export function PendingLink({
...props
}: PendingLinkProps) {
const pathname = usePathname();
const [pending, setPending] = useState(false);
useEffect(() => {
setPending(false);
}, [pathname]);
const [pendingFromPath, setPendingFromPath] = useState<string | null>(null);
const pending = pendingFromPath === pathname;
function handleClick(event: MouseEvent<HTMLAnchorElement>) {
onClick?.(event);
@@ -58,7 +54,7 @@ export function PendingLink({
const nextPath = hrefValue.split("?")[0].split("#")[0];
if (nextPath && nextPath !== pathname) {
setPending(true);
setPendingFromPath(pathname);
}
}