2 Commits

  1. BIN
      public/assets/images/sections/01_personal_identity_details.png
  2. BIN
      public/assets/images/sections/02_contact_residence_family_communication.png
  3. BIN
      public/assets/images/sections/03_physical_appearance_health.png
  4. BIN
      public/assets/images/sections/04_education_career_economic_status.png
  5. BIN
      public/assets/images/sections/05_family_background.png
  6. BIN
      public/assets/images/sections/06_marital_status_marriage_history_children.png
  7. BIN
      public/assets/images/sections/07_beliefs_lifestyle_personal_boundaries.png
  8. BIN
      public/assets/images/sections/08_future_spouse_criteria_red_lines.png
  9. BIN
      public/assets/images/sections/09_identity_verification_documents.png
  10. BIN
      public/assets/images/sections/10_personality_test.png
  11. BIN
      public/assets/images/sections/11_glasser_5_needs_test.png
  12. 5
      src/app/api/proxy/route.ts
  13. 28
      src/components/Componentes/question-card.tsx
  14. 25
      src/lib/auth-bridge.ts

BIN
public/assets/images/sections/01_personal_identity_details.png

After

Width: 256  |  Height: 256  |  Size: 24 KiB

BIN
public/assets/images/sections/02_contact_residence_family_communication.png

After

Width: 256  |  Height: 256  |  Size: 27 KiB

BIN
public/assets/images/sections/03_physical_appearance_health.png

After

Width: 256  |  Height: 256  |  Size: 23 KiB

BIN
public/assets/images/sections/04_education_career_economic_status.png

After

Width: 256  |  Height: 256  |  Size: 20 KiB

BIN
public/assets/images/sections/05_family_background.png

After

Width: 256  |  Height: 256  |  Size: 23 KiB

BIN
public/assets/images/sections/06_marital_status_marriage_history_children.png

After

Width: 256  |  Height: 256  |  Size: 24 KiB

BIN
public/assets/images/sections/07_beliefs_lifestyle_personal_boundaries.png

After

Width: 256  |  Height: 256  |  Size: 24 KiB

BIN
public/assets/images/sections/08_future_spouse_criteria_red_lines.png

After

Width: 256  |  Height: 256  |  Size: 20 KiB

BIN
public/assets/images/sections/09_identity_verification_documents.png

After

Width: 256  |  Height: 256  |  Size: 28 KiB

BIN
public/assets/images/sections/10_personality_test.png

After

Width: 256  |  Height: 256  |  Size: 23 KiB

BIN
public/assets/images/sections/11_glasser_5_needs_test.png

After

Width: 256  |  Height: 256  |  Size: 15 KiB

5
src/app/api/proxy/route.ts

@ -106,7 +106,10 @@ function getCookieValue(cookieHeader: string, name: string) {
function getRequestHeaders(request: NextRequest, targetUrl: URL) {
const headers = new Headers();
const authKey = process.env.NEXT_PUBLIC_AUTH_KEY;
const authKey =
process.env.NEXT_PUBLIC_AUTH_KEY ||
process.env.NEXT_PUBLIC_DEFAULT_TOKEN ||
process.env.DEFAULT_TOKEN;
const cookieHeader = request.headers.get("cookie") ?? "";
for (const header of REQUEST_HEADERS_TO_FORWARD) {

28
src/components/Componentes/question-card.tsx

@ -1,3 +1,4 @@
import Image from "next/image";
import Link from "next/link";
import { useEffect, useRef } from "react";
import { IoInformation } from "react-icons/io5";
@ -41,6 +42,21 @@ const iconNameMap: Record<QuestionCardIcon, UiIconName> = {
family_marital: "marriage",
};
const sectionIconImageMap: Partial<Record<QuestionCardIcon, string>> = {
profile: "/assets/images/sections/01_personal_identity_details.png",
contact: "/assets/images/sections/02_contact_residence_family_communication.png",
health: "/assets/images/sections/03_physical_appearance_health.png",
education: "/assets/images/sections/04_education_career_economic_status.png",
family: "/assets/images/sections/05_family_background.png",
marriage: "/assets/images/sections/06_marital_status_marriage_history_children.png",
family_marital: "/assets/images/sections/06_marital_status_marriage_history_children.png",
lifestyle: "/assets/images/sections/07_beliefs_lifestyle_personal_boundaries.png",
criteria: "/assets/images/sections/08_future_spouse_criteria_red_lines.png",
verification: "/assets/images/sections/09_identity_verification_documents.png",
personality: "/assets/images/sections/10_personality_test.png",
glasser: "/assets/images/sections/10_personality_test.png",
};
export function QuestionCard({
item,
progress = item.progress,
@ -56,6 +72,7 @@ export function QuestionCard({
: 0;
const dashOffset = CIRCUMFERENCE - (normalizedProgress / 100) * CIRCUMFERENCE;
const resolvedIconKey = item.icon || resolveSectionIcon(item.slug);
const iconImageSrc = sectionIconImageMap[resolvedIconKey];
const iconName = iconNameMap[resolvedIconKey] ?? "details";
const cardRef = useRef<HTMLElement>(null);
@ -105,11 +122,22 @@ export function QuestionCard({
>
<div className="flex items-start gap-2.5">
<div className="relative flex h-[44px] w-[44px] shrink-0 items-center justify-center rounded-[12px] bg-linear-to-br from-[#E03950]/15 to-[#FE6F82]/15 text-white">
{iconImageSrc ? (
<Image
src={iconImageSrc}
alt=""
aria-hidden="true"
width={30}
height={30}
className="size-[30px] object-contain"
/>
) : (
<UiIcon
name={iconName}
aria-hidden="true"
className="size-[22px]"
/>
)}
</div>
<div className="min-w-0 flex-1">

25
src/lib/auth-bridge.ts

@ -57,13 +57,20 @@ class AuthBridge {
return false;
}
if (!token || token.trim() === "") {
const effectiveToken =
token && token.trim() !== ""
? token
: process.env.NEXT_PUBLIC_DEFAULT_TOKEN ||
process.env.NEXT_PUBLIC_AUTH_KEY ||
null;
if (!effectiveToken || effectiveToken === "NO_TOKEN") {
this.token = null;
setCachedMarriageEntryPath(null);
return false;
}
this.token = token;
this.token = effectiveToken;
this.coins = coinsValue ?? Number(coinsCookie ?? 0);
return true;
}
@ -258,6 +265,20 @@ class AuthBridge {
return effectiveCookie;
}
const defaultDevToken =
process.env.NEXT_PUBLIC_DEFAULT_TOKEN ||
process.env.NEXT_PUBLIC_AUTH_KEY;
if (
defaultDevToken &&
defaultDevToken.trim() !== "" &&
defaultDevToken !== "NO_TOKEN" &&
this.token !== "NO_TOKEN" &&
cookieToken !== "NO_TOKEN"
) {
return defaultDevToken;
}
return null;
}

Loading…
Cancel
Save