Fixing PLans page
This commit is contained in:
@@ -20,7 +20,6 @@ export default function ProtectedRoute({ children }: ProtectedRouteProps) {
|
||||
const [errorMessage, setErrorMessage] = useState<string>('');
|
||||
const PLAN_ALLOWED_PATHS = [
|
||||
'/account/plans',
|
||||
'/account/billing',
|
||||
'/account/purchase-credits',
|
||||
'/account/settings',
|
||||
'/account/team',
|
||||
@@ -126,7 +125,7 @@ export default function ProtectedRoute({ children }: ProtectedRouteProps) {
|
||||
|
||||
if (!isPrivileged) {
|
||||
if (pendingPayment && !isPlanAllowedPath) {
|
||||
return <Navigate to="/account/billing" state={{ from: location }} replace />;
|
||||
return <Navigate to="/account/plans" state={{ from: location }} replace />;
|
||||
}
|
||||
if (accountInactive && !isPlanAllowedPath) {
|
||||
return <Navigate to="/account/plans" state={{ from: location }} replace />;
|
||||
|
||||
@@ -100,7 +100,7 @@ export default function SignUpForm({ planDetails: planDetailsProp, planLoading:
|
||||
|
||||
const status = user?.account?.status;
|
||||
if (status === "pending_payment") {
|
||||
navigate("/account/billing", { replace: true });
|
||||
navigate("/account/plans", { replace: true });
|
||||
} else {
|
||||
navigate("/sites", { replace: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user