diff --git a/next.config.ts b/next.config.ts
index 78d4dda..8152ad1 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -23,12 +23,6 @@ const nextConfig = {
port: '',
pathname: '/**',
},
- {
- protocol: 'https',
- hostname: 'blog.modstagram.com', // اجازه دادن به نمایش تصاویر وبلاگ
- port: '',
- pathname: '/**',
- },
{
protocol: 'https',
hostname: 'api.modstagram.com',
@@ -96,20 +90,7 @@ const nextConfig = {
];
},
- // ۴. فقط وبلاگ — API/storage از Route Handler پروکسی میشوند
- async rewrites() {
- return [
- {
- source: '/blog',
- destination: 'https://blog.modstagram.com/blog',
- },
- {
- source: '/blog/:path*',
- destination: 'https://blog.modstagram.com/blog/:path*',
- },
- ];
- },
- // ۵. تنظیمات هدرها
+ // ۴. تنظیمات هدرها
async headers() {
return [
{
diff --git a/src/app/billboards/[id]/[title]/page.tsx b/src/app/billboards/[id]/[title]/page.tsx
index c8fad2c..b865801 100644
--- a/src/app/billboards/[id]/[title]/page.tsx
+++ b/src/app/billboards/[id]/[title]/page.tsx
@@ -3,6 +3,7 @@ import BillboardDetailContent from "@/components/billboards/BillboardDetailConte
import BillboardNotFound from "@/components/billboards/BillboardNotFound";
import { IAdvertising, IRate } from "@/types/types";
import { cookies } from "next/headers";
+import { cache } from "react";
import { Metadata } from "next";
import { generatePageMetadata } from "@/utils/generatePageMetadata";
import { getLocaleBundle } from "@/lib/i18n/resources";
@@ -12,7 +13,8 @@ interface IBillboardProps {
params: Promise<{ id: string; title: string }>;
}
-async function getBillboardData(id: string, token: string) {
+// Deduped per request — see loadUser in users/[username]/page.tsx for rationale.
+const getBillboardData = cache(async (id: string, token: string) => {
const response = await fetch(`${BASE_URL}/advertising/get/web/${id}`, {
next: { revalidate: 60 },
headers: {
@@ -21,7 +23,7 @@ async function getBillboardData(id: string, token: string) {
});
if (!response.ok) return null;
return await response.json();
-}
+});
export async function generateMetadata({
params,
diff --git a/src/app/booking/[userId]/page.tsx b/src/app/booking/[userId]/page.tsx
index 7cc768a..b7632e3 100644
--- a/src/app/booking/[userId]/page.tsx
+++ b/src/app/booking/[userId]/page.tsx
@@ -213,7 +213,7 @@ function BookingFlowPage() {
{t("booking.noAvailableSlots")}
) : (
-
+
{slots.map((slot) => (
diff --git a/src/app/settings/booking/list/page.tsx b/src/app/settings/booking/list/page.tsx
index 6d7b628..2f9b33b 100644
--- a/src/app/settings/booking/list/page.tsx
+++ b/src/app/settings/booking/list/page.tsx
@@ -63,7 +63,17 @@ export default function BookingListPage() {
) : (
filteredConfigs.map((config) => (
-
+
+ setConfigs((prev) =>
+ prev
+ ? prev.map((c) => (c._id === id ? { ...c, status } : c))
+ : prev
+ )
+ }
+ />
))
)}
diff --git a/src/app/settings/booking/new/services/page.tsx b/src/app/settings/booking/new/services/page.tsx
index 1719e09..accb565 100644
--- a/src/app/settings/booking/new/services/page.tsx
+++ b/src/app/settings/booking/new/services/page.tsx
@@ -160,7 +160,7 @@ function BookingServicesPage() {
) : (
-
+
{services.map((service) => {
const id = service.id || service._id || "";
const selected = selectedIds.has(id);
@@ -173,22 +173,26 @@ function BookingServicesPage() {
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") toggle(id);
}}
- className={`relative w-full cursor-pointer rounded-2xl ${
- selected ? "bg-[#0095f6]/10" : ""
+ className={`flex w-full cursor-pointer items-center gap-2 rounded-2xl pe-2 ${
+ selected
+ ? "bg-[#0095f6]/10 ring-1 ring-[#0095f6]/50 dark:bg-[#0095f6]/15"
+ : ""
}`}
>
{selected && (
)}
-
+
+
+
);
})}
diff --git a/src/app/settings/edit/analytics/region/page.tsx b/src/app/settings/edit/analytics/region/page.tsx
index bd70b5c..4935b28 100644
--- a/src/app/settings/edit/analytics/region/page.tsx
+++ b/src/app/settings/edit/analytics/region/page.tsx
@@ -80,15 +80,16 @@ export default function RegionPage() {
)}
-
- {t("settings.edit.save")}
-
+
+
+ {t("settings.edit.save")}
+
+
diff --git a/src/app/settings/edit/expertise/page.tsx b/src/app/settings/edit/expertise/page.tsx
index 387a22f..ccd39cc 100644
--- a/src/app/settings/edit/expertise/page.tsx
+++ b/src/app/settings/edit/expertise/page.tsx
@@ -151,7 +151,7 @@ function Expertise() {
return (
-
+
{t("settings.edit.expertise.question")}
diff --git a/src/app/settings/edit/page.tsx b/src/app/settings/edit/page.tsx
index ec7dd7c..44de98c 100644
--- a/src/app/settings/edit/page.tsx
+++ b/src/app/settings/edit/page.tsx
@@ -16,10 +16,8 @@ const EDIT_NAV_KEY: Record
= {
"/username": "username",
"/password": "password",
"/google-account": "googleAccount",
- "/instagram-import": "instagramImport",
"/two-factor": "twoFactor",
"/link-device": "linkDevice",
- "/analytics": "analytics",
"/avatar": "avatar",
"/Authentication": "authentication",
"/expertise": "expertise",
@@ -31,9 +29,6 @@ const EDIT_NAV_KEY: Record = {
"/public-relations": "publicRelations",
"/shaba": "shaba",
"/location": "location",
- "/blocked-users": "blockedUsers",
- "/archive": "archive",
- "/activity": "activity",
};
function EditPage() {
diff --git a/src/app/settings/profile/user-settings/page.tsx b/src/app/settings/profile/user-settings/page.tsx
index afea95c..2261d5f 100644
--- a/src/app/settings/profile/user-settings/page.tsx
+++ b/src/app/settings/profile/user-settings/page.tsx
@@ -10,14 +10,14 @@ import Link from "next/link";
import toast from "react-hot-toast";
import { useTranslation } from "react-i18next";
import { useAppLanguage } from "@/contexts/LanguageProvider";
-import { isAppLanguage } from "@/lib/i18n/constants";
+import { isAppLanguage, type AppLanguage } from "@/lib/i18n/constants";
type PrivacyPatch = {
allow_save_posts?: boolean;
ghost_mode?: boolean;
show_location?: boolean;
post_location_enabled?: boolean;
is_private?: boolean;
- preferred_language?: "fa" | "en";
+ preferred_language?: AppLanguage;
};
type PrivacyResponse = {
@@ -26,7 +26,7 @@ type PrivacyResponse = {
show_location: boolean;
post_location_enabled: boolean;
is_private: boolean;
- preferred_language?: "fa" | "en";
+ preferred_language?: AppLanguage;
};
export default function UserSettingsPage() {
@@ -191,6 +191,30 @@ export default function UserSettingsPage() {
›
+
+ {t("settings.edit.nav.blockedUsers")}
+ ›
+
+
+
+ {t("settings.edit.nav.archive")}
+ ›
+
+
+
+ {t("settings.edit.nav.activity")}
+ ›
+
+