From 74f0cb52a29f41cd273e6836112409dcf83c8a83 Mon Sep 17 00:00:00 2001 From: belopash Date: Thu, 24 Oct 2024 19:15:28 +0500 Subject: [PATCH] feat: make portals demo feature --- src/AppRoutes.tsx | 1 + src/api/subsquid-network-squid/graphql.tsx | 15 +-------------- src/api/subsquid-network-squid/schema.graphql | 10 +--------- src/layouts/NetworkLayout/NetworkMenu.tsx | 15 +++++++++------ src/pages/WorkersPage/WorkersPage.tsx | 10 ++++++++-- 5 files changed, 20 insertions(+), 31 deletions(-) diff --git a/src/AppRoutes.tsx b/src/AppRoutes.tsx index 632ea6e..6ee64f9 100644 --- a/src/AppRoutes.tsx +++ b/src/AppRoutes.tsx @@ -42,6 +42,7 @@ export const AppRoutes = () => { } index /> } path=":peerId" /> + } /> } path="*" /> diff --git a/src/api/subsquid-network-squid/graphql.tsx b/src/api/subsquid-network-squid/graphql.tsx index 1d19f06..56c25f5 100644 --- a/src/api/subsquid-network-squid/graphql.tsx +++ b/src/api/subsquid-network-squid/graphql.tsx @@ -5651,7 +5651,6 @@ export type GatewayFragmentFragment = { website?: string; createdAt: string; owner: { __typename?: 'Account'; id: string; type: AccountType }; - realOwner: { __typename?: 'Account'; id: string; type: AccountType }; }; export type GatewayByPeerIdQueryVariables = Exact<{ @@ -5671,7 +5670,6 @@ export type GatewayByPeerIdQuery = { website?: string; createdAt: string; owner: { __typename?: 'Account'; id: string; type: AccountType }; - realOwner: { __typename?: 'Account'; id: string; type: AccountType }; }; }; @@ -5685,7 +5683,6 @@ export type GatewayStakeFragmentFragment = { lockStart?: number; lockEnd?: number; owner: { __typename?: 'Account'; id: string; type: AccountType }; - realOwner: { __typename?: 'Account'; id: string; type: AccountType }; }; export type MyGatewaysQueryVariables = Exact<{ @@ -5705,7 +5702,6 @@ export type MyGatewaysQuery = { website?: string; createdAt: string; owner: { __typename?: 'Account'; id: string; type: AccountType }; - realOwner: { __typename?: 'Account'; id: string; type: AccountType }; }>; }; @@ -5725,7 +5721,6 @@ export type MyGatewayStakesQuery = { lockStart?: number; lockEnd?: number; owner: { __typename?: 'Account'; id: string; type: AccountType }; - realOwner: { __typename?: 'Account'; id: string; type: AccountType }; }>; networkStats: { __typename?: 'NetworkStats'; @@ -5881,10 +5876,6 @@ export const GatewayFragmentFragmentDoc = ` id type } - realOwner { - id - type - } } `; export const GatewayStakeFragmentFragmentDoc = ` @@ -5893,10 +5884,6 @@ export const GatewayStakeFragmentFragmentDoc = ` id type } - realOwner { - id - type - } autoExtension amount computationUnits @@ -6469,7 +6456,7 @@ export const useGatewayByPeerIdQuery = { onClick={onItemClick} path="/delegations" /> - (active ? : )} - label="Portals" - onClick={onItemClick} - path="/portals" - /> + {demoFeaturesEnabled() && ( + (active ? : )} + label="Portals" + onClick={onItemClick} + path="/portals" + /> + )}
diff --git a/src/pages/WorkersPage/WorkersPage.tsx b/src/pages/WorkersPage/WorkersPage.tsx index 217e68b..3960415 100644 --- a/src/pages/WorkersPage/WorkersPage.tsx +++ b/src/pages/WorkersPage/WorkersPage.tsx @@ -1,7 +1,7 @@ import { percentFormatter, tokenFormatter } from '@lib/formatters/formatters.ts'; import { fromSqd } from '@lib/network'; import { Box, Button, Stack, TableBody, TableCell, TableHead, TableRow } from '@mui/material'; -import { Outlet } from 'react-router-dom'; +import { Link, Outlet } from 'react-router-dom'; import { SortDir, @@ -49,7 +49,13 @@ export function MyWorkers() { <> -