From 33d4edae67c12a2ca97793e95a9a5378954a29e1 Mon Sep 17 00:00:00 2001 From: motahhari Date: Fri, 31 Oct 2025 18:04:38 +0330 Subject: [PATCH] fix error --- docker-compose.yml | 4 ++-- global.d.ts | 1 + package.json | 3 ++- src/lib/api.ts | 2 +- tsconfig.json | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 global.d.ts diff --git a/docker-compose.yml b/docker-compose.yml index 3542f34..8cca635 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,8 +15,8 @@ services: - "traefik.http.routers.nextapp.tls.certresolver=myresolver" - "traefik.http.services.nextapp.loadbalancer.server.port=3000" networks: - - traefik-net + - services networks: - traefik-net: + services: external: true diff --git a/global.d.ts b/global.d.ts new file mode 100644 index 0000000..131286b --- /dev/null +++ b/global.d.ts @@ -0,0 +1 @@ +declare module 'next-pwa'; diff --git a/package.json b/package.json index d73fa9c..f77ce69 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "lint": "eslint" }, "dependencies": { + "jalaali-js": "^1.2.6", "chart.js": "^4.5.0", "next": "15.5.4", "next-pwa": "^5.6.0", @@ -27,4 +28,4 @@ "tailwindcss": "^4", "typescript": "^5" } -} \ No newline at end of file +} diff --git a/src/lib/api.ts b/src/lib/api.ts index 299eda1..1ea06bb 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -47,7 +47,7 @@ export type PagedResult = { pageSize: number } -const API_BASE = process.env.NEXT_PUBLIC_API_URL ?? 'http://localhost:5064' +const API_BASE = process.env.NEXT_PUBLIC_API_URL ?? 'https://ghback.nabaksoft.ir' async function http(url: string, init?: RequestInit): Promise { const res = await fetch(url, { ...init, headers: { 'Content-Type': 'application/json', ...(init?.headers || {}) } }) diff --git a/tsconfig.json b/tsconfig.json index c133409..2096bb0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,6 +22,6 @@ "@/*": ["./src/*"] } }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "global.d.ts"], "exclude": ["node_modules"] }