Skip to content

Commit c4ba2d7

Browse files
committed
fix(web-dashboard): route pricing upgrades to external landing page
1 parent a084351 commit c4ba2d7

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎apps/web-dashboard/src/components/Dashboard/UsageQuota.jsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { Zap } from 'lucide-react';
3-
import { useNavigate } from 'react-router-dom';
3+
44
import UsageProgressBar from './UsageProgressBar';
55
import { usePlan } from '../../context/PlanContext';
66

@@ -12,7 +12,7 @@ const formatBytes = (bytes) => {
1212

1313
const UsageQuota = () => {
1414
const { planData } = usePlan();
15-
const navigate = useNavigate();
15+
1616

1717
if (!planData) return null;
1818

@@ -103,7 +103,7 @@ const UsageQuota = () => {
103103
{!isPro && (
104104
<button
105105
id="usage-quota-upgrade-btn"
106-
onClick={() => navigate('/pricing')}
106+
onClick={() => window.location.href = 'https://urbackend.bitbros.in/pricing'}
107107
className="btn btn-secondary"
108108
style={{ marginTop: '0.5rem', width: '100%', fontSize: '0.75rem', padding: '5px' }}
109109
>

‎apps/web-dashboard/src/pages/Dashboard.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export default function Dashboard() {
176176
</span>
177177
</div>
178178
<button
179-
onClick={() => navigate('/pricing')}
179+
onClick={() => window.location.href = 'https://urbackend.bitbros.in/pricing'}
180180
className="btn btn-secondary"
181181
style={{ fontSize: '0.75rem', padding: '3px 10px', whiteSpace: 'nowrap', flexShrink: 0 }}
182182
>

‎apps/web-dashboard/src/utils/api.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ api.interceptors.response.use(
103103

104104
if (isPlanError && !isVerificationGate) {
105105
toast.error("Plan limit reached. Please upgrade to continue.");
106-
if (window.location.pathname !== '/pricing') {
107-
window.location.assign('/pricing');
106+
if (window.location.href !== 'https://urbackend.bitbros.in/pricing') {
107+
window.location.assign('https://urbackend.bitbros.in/pricing');
108108
}
109109
return Promise.reject(error);
110110
} else {

0 commit comments

Comments
 (0)