feat(ux): add nextjs-toploader navigation progress bar and resolve local dev port conflicts
Deploy Canina / deploy (push) Successful in 1m32s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 6s

This commit is contained in:
parsa aghaei committed 2026-08-29 13:31:05 +03:30
1 parent b68dd29541
commit 2d54fc8208
19 files changed
+11241 -11034

No files matched your search

+13
View File
@@ -1,5 +1,6 @@
import type { Metadata } from 'next';
import './globals.css';
import NextTopLoader from 'nextjs-toploader';
import ClientLayout from './ClientLayout';
import { getSeoConfig } from '../lib/seo';
import { vazirmatn, lalezar } from '../lib/fonts';
@@ -146,6 +147,18 @@ export default function RootLayout({
return (
<html lang="fa" dir="rtl" className={`${vazirmatn.variable} ${lalezar.variable}`} suppressHydrationWarning>
<body className="min-h-screen bg-medical-gray-50 font-sans" suppressHydrationWarning>
<NextTopLoader
color="#0284c7"
initialPosition={0.08}
crawlSpeed={200}
height={3}
crawl={true}
showSpinner={false}
easing="ease"
speed={200}
shadow="0 0 12px rgba(2,132,199,0.7), 0 0 4px #0284c7"
zIndex={99999}
/>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: safeJsonLd }}
+3 -3
View File
@@ -5,13 +5,13 @@ import { useUserStore } from '../store/userStore';
const getBaseURL = () => {
if (process.env.NEXT_PUBLIC_API_URL) return process.env.NEXT_PUBLIC_API_URL;
if (typeof window === 'undefined') {
return 'http://127.0.0.1:4001/api';
return 'http://127.0.0.1:4400/api';
}
return process.env.NODE_ENV === 'development' ? 'http://localhost:4001/api' : '/api';
return process.env.NODE_ENV === 'development' ? 'http://localhost:4400/api' : '/api';
};
const baseURL = getBaseURL();
export const BASE_DOMAIN = process.env.NEXT_PUBLIC_API_URL?.replace('/api', '') || (typeof window !== 'undefined' && process.env.NODE_ENV === 'development' ? 'http://localhost:4001' : '');
export const BASE_DOMAIN = process.env.NEXT_PUBLIC_API_URL?.replace('/api', '') || (typeof window !== 'undefined' && process.env.NODE_ENV === 'development' ? 'http://localhost:4400' : '');
export interface ApiErrorPayload {
success: boolean;
+25 -5
View File
@@ -12,6 +12,7 @@
"lucide-react": "^0.475.0",
"motion": "^12.40.0",
"next": "16.2.9",
"nextjs-toploader": "^3.9.17",
"react": "19.2.4",
"react-dom": "19.2.4",
"sonner": "^2.0.7",
@@ -5728,7 +5729,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
"dev": true,
"license": "MIT"
},
"node_modules/js-yaml": {
@@ -6212,7 +6212,6 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"js-tokens": "^3.0.0 || ^4.0.0"
@@ -6524,6 +6523,24 @@
"node": "^10 || ^12 || >=14"
}
},
"node_modules/nextjs-toploader": {
"version": "3.9.17",
"resolved": "https://registry.npmjs.org/nextjs-toploader/-/nextjs-toploader-3.9.17.tgz",
"integrity": "sha512-9OF0KSSLtoSAuNg2LZ3aTl4hR9mBDj5L9s9DZiFCbMlXehyICGjkIz5dVGzuATU2bheJZoBdFgq9w07AKSuQQw==",
"license": "MIT",
"dependencies": {
"nprogress": "^0.2.0",
"prop-types": "^15.8.1"
},
"funding": {
"url": "https://buymeacoffee.com/thesgj"
},
"peerDependencies": {
"next": ">= 6.0.0",
"react": ">= 16.0.0",
"react-dom": ">= 16.0.0"
}
},
"node_modules/node-exports-info": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/node-exports-info/-/node-exports-info-1.6.0.tgz",
@@ -6553,11 +6570,16 @@
"node": ">=18"
}
},
"node_modules/nprogress": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz",
"integrity": "sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==",
"license": "MIT"
},
"node_modules/object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -6928,7 +6950,6 @@
"version": "15.8.1",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
"integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
"dev": true,
"license": "MIT",
"dependencies": {
"loose-envify": "^1.4.0",
@@ -7001,7 +7022,6 @@
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
"dev": true,
"license": "MIT"
},
"node_modules/redent": {
+1
View File
@@ -13,6 +13,7 @@
"lucide-react": "^0.475.0",
"motion": "^12.40.0",
"next": "16.2.9",
"nextjs-toploader": "^3.9.17",
"react": "19.2.4",
"react-dom": "19.2.4",
"sonner": "^2.0.7",