Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"Notifications": "Notifications",
"Common": {
"home": "Home",
"explore": "Explore Causes",
Expand Down
1 change: 1 addition & 0 deletions messages/es.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"Notifications": "Notificaciones",
"Common": {
"home": "Inicio",
"explore": "Explorar Causas",
Expand Down
33 changes: 27 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions scripts/bundle-size-baseline.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"_note": "Auto-generated by `node scripts/bundle-size-check.mjs --update-baseline`. Commit after each intentional size increase.",
"_updated": "2026-06-30",
"totalBytes": 570241,
"_updated": "2026-07-31",
"totalBytes": 569964,
"chunks": {
"static/chunks/03~yq9q893hmn.js": 112594,
"static/EFUAukEe4BQWGkXQouKuF/_buildManifest.js": 219,
"static/EFUAukEe4BQWGkXQouKuF/_ssgManifest.js": 80,
"static/EFUAukEe4BQWGkXQouKuF/_clientMiddlewareManifest.js": 728,
"static/chunks/15ge1cx8gmm3q.js": 29152,
"static/chunks/07uz2g0_38qia.js": 43946,
"static/chunks/0z-p5-wlhj.ms.js": 145628,
"static/chunks/063f4u.4z~v2d.js": 227314,
"static/chunks/turbopack-0kgl1s8x.zmfr.js": 10580
"static/chunks/0cz1d0mv5g_q7.js": 112594,
"static/LqutzU_IdSKvCZjenwahI/_buildManifest.js": 219,
"static/LqutzU_IdSKvCZjenwahI/_ssgManifest.js": 76,
"static/LqutzU_IdSKvCZjenwahI/_clientMiddlewareManifest.js": 317,
"static/chunks/1zxop_o4-qqqa.js": 30111,
"static/chunks/0paxexg6-m0de.js": 43946,
"static/chunks/2xpj996qdmuie.js": 226356,
"static/chunks/0ltsk67_6zwi_.js": 145765,
"static/chunks/turbopack-09xmycro7wieo.js": 10580
}
}
1 change: 1 addition & 0 deletions src/__tests__/app/sitemap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe("sitemap", () => {
{
id: 42,
created_at: 1_700_000_000,
is_active: true,
} as Awaited<ReturnType<typeof getAllCampaigns>>[number],
]);

Expand Down
4 changes: 4 additions & 0 deletions src/__tests__/components/CommentItem.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React from "react";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import CommentItem from "@/components/CommentItem";

jest.mock("@/components/ToastProvider", () => ({
useToast: () => ({ showError: jest.fn(), showSuccess: jest.fn() })
}));
import { useWallet } from "@/components/WalletContext";

jest.mock("@/components/WalletContext", () => ({
Expand Down
3 changes: 0 additions & 3 deletions src/__tests__/components/ContributorLeaderboard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ jest.mock("@/hooks/useTopContributors", () => ({
mockUseTopContributors(campaignId, wallet, limit),
}));

jest.mock("next-intl", () => ({
useLocale: () => "en",
}));

const WALLET_1 = "GDA7X7P5H4F3R8E2M1N6K9W4L5V8Q3Z0A1B2C3D4E5F6G7H8I9J0K1L2";
const WALLET_2 = "GBX8Y8Q6I5G4S9F3N2O7L0X5M6W9R4A1B2C3D4E5F6G7H8I9J0K1L2M3";
Expand Down
36 changes: 0 additions & 36 deletions src/__tests__/components/DonationModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,42 +30,6 @@ jest.mock("@/hooks/usePlatformFee", () => ({
}),
}));

jest.mock("next-intl", () => ({
useLocale: () => "en",
useTranslations: () => (key: string, values?: Record<string, unknown>) => {
const map: Record<string, string> = {
title: "Fund This Cause",
confirmedTitle: "Donation Confirmed",
amountLabel: "Amount (XLM)",
percentFunded: `${values?.percent}% funded`,
afterDonation: `After your donation: ${values?.percent}% funded`,
goalReached: "Goal reached!",
contributionLine: "Contribution",
networkFeeLine: "Est. network fee",
totalLine: "Total from your wallet",
donate: "Donate",
donateAmount: `Donate ${values?.amount} XLM`,
platformFeeNote: `A platform fee of ${values?.feePercent} is deducted from funds when withdrawn by the creator. Your full donation goes toward the campaign total.`,
networkFeeNote: "Network fee note",
waitingSignature: "Waiting for Freighter signature…",
waitingConfirmation: "Waiting for ledger confirmation…",
submitting: "Submitting transaction to the network…",
donatedSuccess: `${values?.amount} XLM donated successfully`,
thankYou: "Thank you for supporting this cause.",
viewExplorer: "View on Stellar Explorer →",
close: "Close",
scientificNotation: "Scientific notation is not allowed.",
invalidNumber: "Please enter a valid number.",
invalidAmount: "Please enter a valid amount.",
amountMustBePositive: "Amount must be greater than zero.",
invalidNumberFormat: "Invalid number format.",
maxDecimalPlaces: "Maximum 7 decimal places allowed.",
amountExceedsRemainingGoal: "Amount exceeds the remaining funding goal.",
campaignAlreadyFunded: "This cause is already fully funded.",
};
return map[key] ?? key;
},
}));

jest.mock("@/lib/analytics", () => ({
trackClickContribute: jest.fn(),
Expand Down
14 changes: 8 additions & 6 deletions src/__tests__/components/LanguageSwitcher.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ import LanguageSwitcher from "@/components/LanguageSwitcher";

const mockReplace = jest.fn();

const mockT = (key: string, values?: Record<string, string>) => {
if (key === "selectLanguage") return "Select language";
if (key === "currentLanguage") return `Current language: ${values?.language}`;
if (key === "languageChanged") return `Language changed to ${values?.language}`;
return key;
};

jest.mock("next-intl", () => ({
useLocale: () => "en",
useTranslations: () => (key: string, values?: Record<string, string>) => {
if (key === "selectLanguage") return "Select language";
if (key === "currentLanguage") return `Current language: ${values?.language}`;
if (key === "languageChanged") return `Language changed to ${values?.language}`;
return key;
},
useTranslations: () => mockT,
}));

jest.mock("@/i18n/routing", () => ({
Expand Down
Loading
Loading