fix error

This commit is contained in:
motahhari
2025-10-31 18:04:38 +03:30
parent a96fbfa91c
commit 33d4edae67
5 changed files with 7 additions and 5 deletions

View File

@@ -15,8 +15,8 @@ services:
- "traefik.http.routers.nextapp.tls.certresolver=myresolver" - "traefik.http.routers.nextapp.tls.certresolver=myresolver"
- "traefik.http.services.nextapp.loadbalancer.server.port=3000" - "traefik.http.services.nextapp.loadbalancer.server.port=3000"
networks: networks:
- traefik-net - services
networks: networks:
traefik-net: services:
external: true external: true

1
global.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
declare module 'next-pwa';

View File

@@ -9,6 +9,7 @@
"lint": "eslint" "lint": "eslint"
}, },
"dependencies": { "dependencies": {
"jalaali-js": "^1.2.6",
"chart.js": "^4.5.0", "chart.js": "^4.5.0",
"next": "15.5.4", "next": "15.5.4",
"next-pwa": "^5.6.0", "next-pwa": "^5.6.0",
@@ -27,4 +28,4 @@
"tailwindcss": "^4", "tailwindcss": "^4",
"typescript": "^5" "typescript": "^5"
} }
} }

View File

@@ -47,7 +47,7 @@ export type PagedResult<T> = {
pageSize: number 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<T>(url: string, init?: RequestInit): Promise<T> { async function http<T>(url: string, init?: RequestInit): Promise<T> {
const res = await fetch(url, { ...init, headers: { 'Content-Type': 'application/json', ...(init?.headers || {}) } }) const res = await fetch(url, { ...init, headers: { 'Content-Type': 'application/json', ...(init?.headers || {}) } })

View File

@@ -22,6 +22,6 @@
"@/*": ["./src/*"] "@/*": ["./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"] "exclude": ["node_modules"]
} }