Skip to content

Commit 962927b

Browse files
Merge pull request #1526 from ssvlabs/refactor/remove-bapps
fix: removed bapps
2 parents 3eb7fae + bd915c0 commit 962927b

File tree

7 files changed

+9
-44
lines changed

7 files changed

+9
-44
lines changed

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/pr-automation/index.cjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,10 @@ async function addReviewers(owner, repo, prNumber) {
123123
{
124124
reviewers: [
125125
"IlyaVi",
126+
"sumbat-ssvlabs",
127+
"Chris-ssvlabs",
126128
"axelrod-blox",
127129
"nir-ssvlabs",
128-
"sumbat-ssvlabs",
129130
"stefan-ssv-labs",
130131
],
131132
},

src/app/layouts/dashboard/dashboard.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Navbar } from "@/app/layouts/dashboard/navbar";
21
import { NavbarDVT } from "@/app/layouts/dashboard/navbar-dvt";
32
import { AssetWithdrawalModal } from "@/components/modals/bapp/asset-withdrawal-modal";
43
import { AssetsDepositModal } from "@/components/modals/bapp/assets-deposit-modal";
@@ -9,7 +8,6 @@ import { TransactionModal } from "@/components/ui/transaction-modal";
98
import { useAccount } from "@/hooks/account/use-account";
109
import { useAccountState } from "@/hooks/account/use-account-state.ts";
1110
import { useMaintenance } from "@/hooks/app/use-maintenance";
12-
import { useAppVersion } from "@/hooks/temp-delete-after-merge/use-app-version";
1311
import { useBlockNavigationOnPendingTx } from "@/hooks/use-block-navigation-on-pending-tx";
1412
import { useIdentify } from "@/lib/analytics/mixpanel/useIdentify";
1513
import { useTrackPageViews } from "@/lib/analytics/mixpanel/useTrackPageViews";
@@ -33,7 +31,6 @@ export const DashboardLayout: FC<ComponentPropsWithRef<"div">> = ({
3331

3432
const { isMaintenancePage } = useMaintenance();
3533
const { isLoadingClusters, isLoadingOperators } = useAccountState();
36-
const app = useAppVersion();
3734
if (isMaintenancePage) {
3835
return <Navigate to="/maintenance" replace />;
3936
}
@@ -66,11 +63,7 @@ export const DashboardLayout: FC<ComponentPropsWithRef<"div">> = ({
6663
exit={{ opacity: 0 }}
6764
key="content"
6865
>
69-
{app.isDvtOnly ? (
70-
<NavbarDVT className="px-5" />
71-
) : (
72-
<Navbar className="px-5" />
73-
)}
66+
<NavbarDVT className="px-5" />
7467
<main className={cn(className, "flex-1 overflow-auto")}>
7568
{children}
7669
</main>

src/app/routes/root-redirection.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import { Navigate } from "react-router";
44
import { cn } from "@/lib/utils/tw.ts";
55
import { SsvLoader } from "@/components/ui/ssv-loader.tsx";
66
import { motion } from "framer-motion";
7-
import { useAppVersion } from "@/hooks/temp-delete-after-merge/use-app-version";
87

9-
const REDIRECT_EXCLUSIONS = ["/", "/connect", "/compliance"];
108
export const Redirector = () => {
119
const { isLoadingClusters, isLoadingOperators, hasClusters, hasOperators } =
1210
useAccountState();
@@ -17,8 +15,6 @@ export const Redirector = () => {
1715
const landedOnClusterPage = landingPage.startsWith("/clusters");
1816
const landedOnOperatorsPage = landingPage.startsWith("/operators");
1917

20-
const app = useAppVersion();
21-
2218
if (isLoadingClusters)
2319
return (
2420
<motion.div
@@ -54,12 +50,5 @@ export const Redirector = () => {
5450
if (landedOnOperatorsPage && hasOperators)
5551
return <Navigate to={landingPage} replace />;
5652

57-
if (app.isDvtOnly) {
58-
return <Navigate to="/join" replace />;
59-
}
60-
61-
if (!REDIRECT_EXCLUSIONS.includes(landingPage))
62-
return <Navigate to={landingPage} replace />;
63-
64-
return <Navigate to="/account/my-delegations" />;
53+
return <Navigate to="/join" replace />;
6554
};

src/app/routes/router.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { proxy, useSnapshot } from "valtio";
77

88
import { Compliance } from "@/app/routes/compliance";
99
import { Maintenance } from "@/app/routes/maintenance";
10-
import { accountRoutes } from "@/app/routes/router/route-definitions/account-routes.tsx";
1110
import type { RouteObject } from "react-router-dom";
1211
import { createBrowserRouter, Outlet } from "react-router-dom";
1312
import { NotFound } from "./not-found";
@@ -36,7 +35,6 @@ const routes = [
3635
element: <FeeRecipientAddress />,
3736
},
3837
joinRoutes,
39-
accountRoutes,
4038
clustersRoutes,
4139
operatorsRoutes,
4240
],

src/hooks/account/use-account-state.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { useCreatedOptimisticOperators } from "@/hooks/operator/use-created-opti
44
import { getPaginatedAccountOperatorsQueryOptions } from "@/hooks/operator/use-paginated-account-operators";
55
import { useQuery } from "@tanstack/react-query";
66
import { useMyBAppAccount } from "@/hooks/b-app/use-my-b-app-account.ts";
7-
import { useAppVersion } from "@/hooks/temp-delete-after-merge/use-app-version";
87

98
export const useAccountState = () => {
109
const account = useAccount();
@@ -21,8 +20,6 @@ export const useAccountState = () => {
2120

2221
const createdOptimisticOperators = useCreatedOptimisticOperators();
2322

24-
const app = useAppVersion();
25-
2623
const isLoading =
2724
clusters.isLoading || operators.isLoading || myBAppAccount.isLoading;
2825

@@ -43,9 +40,7 @@ export const useAccountState = () => {
4340
? "/connect"
4441
: isLoading
4542
? undefined
46-
: app.isDvtOnly
47-
? dvtRoutePath
48-
: "/account/my-delegations";
43+
: dvtRoutePath;
4944

5045
return {
5146
isLoading,

src/hooks/temp-delete-after-merge/use-app-version.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)