Browse Source

fix: correct app_name parameters, adjust SSR fetch timeouts and logging, and update payment UI label

master
mortezaei 6 days ago
parent
commit
d628cdbd77
  1. 2
      src/app/new-match/new-match-client.tsx
  2. 3
      src/hooks/marriage/use-habcoin-payment.ts
  3. 1
      src/hooks/marriage/use-validate-discount.ts

2
src/app/new-match/new-match-client.tsx

@ -884,7 +884,7 @@ export default function NewMatchClient() {
) : ( ) : (
<> <>
<span className="truncate min-w-0"> <span className="truncate min-w-0">
{t["Pay"] || "Pay"}
{t["Payment"] || "Payment"}
</span> </span>
<span className="inline-flex items-center gap-1 rounded-[12px] bg-black/15 px-[9px] py-[4px] text-xs font-semibold leading-none text-white shrink-0 min-w-0 whitespace-nowrap"> <span className="inline-flex items-center gap-1 rounded-[12px] bg-black/15 px-[9px] py-[4px] text-xs font-semibold leading-none text-white shrink-0 min-w-0 whitespace-nowrap">
<Image <Image

3
src/hooks/marriage/use-habcoin-payment.ts

@ -6,6 +6,7 @@ import type { MutationOptions } from "./options";
import { marriageQueryKeys } from "./query-keys"; import { marriageQueryKeys } from "./query-keys";
const HABCOIN_PAY_SERVICE = "marriagesubscriptionplan" as const; const HABCOIN_PAY_SERVICE = "marriagesubscriptionplan" as const;
const HABCOIN_PAY_APP_NAME = "marriage" as const;
type HabcoinPaymentResponse = unknown; type HabcoinPaymentResponse = unknown;
@ -69,7 +70,7 @@ export async function getHabcoinPayment(params: HabcoinPaymentParams) {
const queryParams: Record<string, unknown> = { const queryParams: Record<string, unknown> = {
token: getSecurityToken(), token: getSecurityToken(),
service: HABCOIN_PAY_SERVICE, service: HABCOIN_PAY_SERVICE,
app_name: HABCOIN_PAY_SERVICE,
app_name: HABCOIN_PAY_APP_NAME,
object_id: objectId, object_id: objectId,
}; };

1
src/hooks/marriage/use-validate-discount.ts

@ -31,6 +31,7 @@ export async function validateDiscountCode({
const { data } = await http.post<any>("/habcoin/validate-discount/", { const { data } = await http.post<any>("/habcoin/validate-discount/", {
code, code,
service, service,
app_name: "marriage",
object_id: objectId, object_id: objectId,
}); });

Loading…
Cancel
Save