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
Binary file modified bun.lockb
Binary file not shown.
5,574 changes: 0 additions & 5,574 deletions package-lock.json

This file was deleted.

43 changes: 43 additions & 0 deletions public/BDLogo_Black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions public/DeepaLogo_Black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/app/dashboard/history/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default function HistoryPage() {
{authToken && (
<button
onClick={() => refetch()}
className="rounded-xl border border-gray-600 p-2 text-gray-400 transition-colors hover:border-orange-500 hover:text-orange-500"
className="rounded-xl border border-gray-200 dark:border-gray-600 p-2 text-gray-400 transition-colors hover:border-orange-500 hover:text-orange-500"
title="Refresh transactions"
>
<svg
Expand Down Expand Up @@ -273,9 +273,9 @@ export default function HistoryPage() {
})
) : (
<div className="py-12 text-center">
<div className="mb-6 inline-flex h-20 w-20 items-center justify-center rounded-full border border-gray-600 bg-gradient-to-br from-gray-700 to-gray-800">
<div className="mb-6 inline-flex h-20 w-20 items-center justify-center rounded-full border border-gray-300 dark:border-gray-600 bg-gray-200 dark:bg-gray-700">
<svg
className="h-10 w-10 text-gray-400"
className="h-10 w-10 text-gray-600 dark:text-gray-400"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand Down
53 changes: 27 additions & 26 deletions src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,32 +179,33 @@ export default function WalletPage() {
}
}, [summaryError]);

useEffect(() => {
const checkKycStatus = async () => {
if (authToken) {
try {
const res = await fetch(`/api/user/kyc/status`, {
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${authToken}`,
},
});

if (res.ok) {
const data = await res.json();
if (data.status !== "APPROVED") {
router.push("/verification");
}
}
} catch (error) {
console.error("Error checking KYC status:", error);
}
}
};

checkKycStatus();
}, [authToken, router]);
// Temporarily disabled for testing
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment should specify what needs to be done before re-enabling this code and under what conditions it should be restored (e.g., 'Temporarily disabled for testing - re-enable before production deployment').

Suggested change
// Temporarily disabled for testing
// Temporarily disabled for testing. Re-enable this code before production deployment to ensure KYC status is checked and users are redirected to verification if not approved.

Copilot uses AI. Check for mistakes.
// useEffect(() => {
// const checkKycStatus = async () => {
// if (authToken) {
// try {
// const res = await fetch(`/api/user/kyc/status`, {
// method: "GET",
// headers: {
// "Content-Type": "application/json",
// Authorization: `Bearer ${authToken}`,
// },
// });

// if (res.ok) {
// const data = await res.json();
// if (data.status !== "APPROVED") {
// router.push("/verification");
// }
// }
// } catch (error) {
// console.error("Error checking KYC status:", error);
// }
// }
// };

// checkKycStatus();
// }, [authToken, router]);

if (authError) {
return (
Expand Down
20 changes: 11 additions & 9 deletions src/app/dashboard/subscription/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ import { Button } from "@telegram-apps/telegram-ui";
import { formatDate } from "@/lib/formatters";
import { useQuery } from "@tanstack/react-query";
import { queryKeys } from "@/lib/query-keys";
import { useTheme } from "@/app/context/theme";

export default function SubscriptionPage() {
const [selectedPlan, setSelectedPlan] = useState<string>();
const [activeTab, setActiveTab] = useState<"plans" | "status">("plans");
const { subscription, setSubscription } = useStore();
const { isDark } = useTheme();

const redirectToPayHereViaPage = usePayHereRedirect();

Expand Down Expand Up @@ -341,7 +343,7 @@ export default function SubscriptionPage() {
{/* Header */}
<div className="mb-7 flex items-center justify-center">
<Image
src="/DeepaLogo_WnO.svg"
src={isDark ? "/DeepaLogo_WnO.svg" : "/DeepaLogo_Black.svg"}
alt="Bitcoin Deepa"
width={100}
height={50}
Expand All @@ -351,19 +353,19 @@ export default function SubscriptionPage() {

{/* Tabs - segmented control */}
<div className="mb-6">
<div className="relative grid grid-cols-2 items-center rounded-2xl border border-zinc-800 bg-tma-bg-secondary p-1">
<div className="relative grid grid-cols-2 items-center rounded-2xl border border-zinc-100 dark:border-zinc-800 bg-tma-bg-secondary p-1">
{/* Sliding background */}
<div
className={cn(
"absolute inset-y-1 left-1 w-[calc(50%-0.25rem)] transform-gpu rounded-xl bg-zinc-800 transition-transform duration-200 ease-out",
"absolute inset-y-1 left-1 w-[calc(50%-0.25rem)] transform-gpu rounded-xl bg-orange-500 dark:bg-zinc-800 transition-transform duration-200 ease-out",
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an extra space between inset-y-1 and left-1. Remove the double space for consistency.

Suggested change
"absolute inset-y-1 left-1 w-[calc(50%-0.25rem)] transform-gpu rounded-xl bg-orange-500 dark:bg-zinc-800 transition-transform duration-200 ease-out",
"absolute inset-y-1 left-1 w-[calc(50%-0.25rem)] transform-gpu rounded-xl bg-orange-500 dark:bg-zinc-800 transition-transform duration-200 ease-out",

Copilot uses AI. Check for mistakes.
activeTab === "status" && "translate-x-full"
)}
/>
<button
onClick={() => onTabChange("plans")}
className={cn(
"relative z-10 inline-flex items-center justify-center rounded-xl py-2.5 font-medium transition-colors",
activeTab === "plans" ? "text-orange-500" : "text-tma-text-secondary"
activeTab === "plans" ? "text-white dark:text-orange-500" : "text-tma-text-secondary"
)}
>
Plans
Expand All @@ -372,7 +374,7 @@ export default function SubscriptionPage() {
onClick={() => onTabChange("status")}
className={cn(
"relative z-10 inline-flex items-center justify-center rounded-xl py-2.5 font-medium transition-colors",
activeTab === "status" ? "text-orange-500" : "text-tma-text-secondary"
activeTab === "status" ? "text-white dark:text-orange-500" : "text-tma-text-secondary"
)}
>
My Membership
Expand Down Expand Up @@ -405,7 +407,7 @@ export default function SubscriptionPage() {
"flex cursor-pointer items-center justify-between rounded-xl border-2 p-3 transition-all duration-300",
selectedPlan === plan.id
? "border-orange-500 bg-gradient-to-r from-orange-500/10 to-orange-600/10 shadow-lg shadow-orange-500/20"
: "border-gray-700 bg-tma-bg-card hover:border-gray-600"
: "border-gray-200 dark:border-gray-700 bg-tma-bg-card hover:border-gray-600"
)}
onClick={() => setSelectedPlan(plan.id)}
>
Expand Down Expand Up @@ -519,7 +521,7 @@ export default function SubscriptionPage() {
<div className="text-center">
<div className="mb-2 inline-flex h-12 w-12 items-center justify-center rounded-full bg-green-500/20">
<svg
className="h-6 w-6 text-green-400"
className="h-6 w-6 text-green-600 dark:text-green-400"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
Expand All @@ -532,7 +534,7 @@ export default function SubscriptionPage() {
/>
</svg>
</div>
<h2 className="mb-2 text-lg font-medium text-green-400">
<h2 className="mb-2 text-lg font-medium text-green-600 dark:text-green-400">
Active Membership
</h2>
<h3 className="text-xl font-semibold">
Expand Down Expand Up @@ -579,7 +581,7 @@ export default function SubscriptionPage() {
className={cn(
"font-medium",
subscription.isActive
? "text-green-400"
? "text-green-600 dark:text-green-400"
: "text-red-400"
)}
>
Expand Down
Loading
Loading