From 8ec61559fee404a5885255befb2e579b048cc4e1 Mon Sep 17 00:00:00 2001 From: nwhco Date: Sat, 18 Jan 2025 13:28:57 +0100 Subject: [PATCH] production --- .env | 7 +++++-- next.config.js | 6 +++++- .../Frame 1000005697.webp => a1.webp} | Bin .../dashboard/widgets/subscription/subscription.tsx | 4 +++- tsconfig.json | 2 +- 5 files changed, 14 insertions(+), 5 deletions(-) rename public/image/{subscriptions/Frame 1000005697.webp => a1.webp} (100%) diff --git a/.env b/.env index 9860ea1..517636e 100644 --- a/.env +++ b/.env @@ -4,5 +4,8 @@ NEXT_PUBLIC_AVAILABLE_LANGUAGES=en NEXT_PUBLIC_ENABLE_MULTI_LANG=true NODE_ENV=production NEXT_PUBLIC_REST_API_ENDPOINT=https://mesbahi.nwhco.ir/api -NEXT_PUBLIC_SITE_URL=https://mesbahi.nwhco.ir:3000 -NEXT_PUBLIC_AUTH_TOKEN_KEY=AUTH_CRED \ No newline at end of file +NEXT_PUBLIC_SITE_URL=https://mesbahi.nwhco.ir:3000/ +# NEXT_PUBLIC_BASE_PATH: '/dashboard' + +NEXT_PUBLIC_AUTH_TOKEN_KEY=AUTH_CRED +NEXT_PUBLIC_BASE_PATH=/dashboard \ No newline at end of file diff --git a/next.config.js b/next.config.js index 062b461..4b9db8b 100644 --- a/next.config.js +++ b/next.config.js @@ -11,9 +11,13 @@ const { i18n } = require('./next-i18next.config'); const nextConfig = { basePath: '/dashboard', - assetPrefix: '/dashboard/', + // assetPrefix: '/dashboard/', reactStrictMode: true, + i18n, + publicRuntimeConfig: { + basePath: '/dashboard', + }, typescript: { ignoreBuildErrors: true, }, diff --git a/public/image/subscriptions/Frame 1000005697.webp b/public/image/a1.webp similarity index 100% rename from public/image/subscriptions/Frame 1000005697.webp rename to public/image/a1.webp diff --git a/src/components/dashboard/widgets/subscription/subscription.tsx b/src/components/dashboard/widgets/subscription/subscription.tsx index 1a5315d..24280bf 100644 --- a/src/components/dashboard/widgets/subscription/subscription.tsx +++ b/src/components/dashboard/widgets/subscription/subscription.tsx @@ -3,6 +3,8 @@ import { useGetActiveSubscription } from '@/data/subscription'; import Image from 'next/image'; import React from 'react'; import { useTranslation } from 'react-i18next'; +import background from '../../../../../public/image/a1.webp'; + const Subscription: React.FC = () => { const { t } = useTranslation('common'); // Specify the namespace if using multiple @@ -34,7 +36,7 @@ const Subscription: React.FC = () => { {' '} {/* Use relative positioning for next/image with fill */}