Skip to content

Commit 81e5f3c

Browse files
committed
fix(sidebar): resolve Wallet ReferenceError and clean up routing console warnings
1 parent 63bdc0d commit 81e5f3c

4 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/config/sidebar.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
CreditCard,
99
Users,
1010
Settings,
11+
Wallet as WalletIcon,
1112
} from "lucide-react";
1213

1314
export const sidebarItems = [
@@ -55,7 +56,7 @@ export const sidebarItems = [
5556
{
5657
title: "Wallet",
5758
path: "/org/billing/wallet",
58-
icon: Wallet,
59+
icon: WalletIcon,
5960
},
6061
{
6162
title: "Usage",

src/features/Billing/v1/hooks/useBillingGate.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import { useMemo } from "react";
22
import { useWallet } from "./useWallet";
33
import { isLowBalance } from "../utils/credits";
44

5+
const DEFAULT_LOW_BALANCE_THRESHOLD = 200;
6+
7+
58
export function useBillingGate() {
69
const { data: wallet } = useWallet();
710

src/routes/MemberRoutes.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ const MemberRoutes = () => {
9393
</div>
9494
}
9595
/>
96+
{/* Fallback route to suppress "No routes matched location" warning on non-member paths */}
97+
<Route path="*" element={null} />
9698
</Routes>
9799
);
98100
};

src/routes/OrgRoute.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ const OrgRoute = () => {
9090
{/* Add Member */}
9191
<Route path="add-member" element={<AddMemberPage />} />
9292
</Route>
93+
{/* Fallback route to suppress "No routes matched location" warning on non-org paths */}
94+
<Route path="*" element={null} />
9395
</Routes>
9496
</Suspense>
9597
);

0 commit comments

Comments
 (0)