Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Implement route /validatorsPerformance route" #365

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions packages/ui/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React, { useEffect } from "react";
import { Alert, CircularProgress } from "@mui/material";
import TopBar from "./components/TopBar/TopBar";
import { ValidatorsImport } from "./components/ValidatorsImport/ValidatorsImport";
import ImportScreen from "./ImportScreen";
import ValidatorList from "./components/ValidatorList/ValidatorList";
import ValidatorsPerformance from "./components/ValidatorsPerformance/ValidatorsPerformance";
import { ThemeProvider, createTheme } from "@mui/material/styles";
import CssBaseline from "@mui/material/CssBaseline";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import React, { useEffect } from "react";
import { StakerConfig } from "@stakingbrain/common";
import { rpcClient } from "./socket";
import type { Web3SignerStatus } from "@stakingbrain/brain";
Expand Down Expand Up @@ -105,9 +104,8 @@ function App(): JSX.Element {
<Route path="/" element={<ValidatorList stakerConfig={stakerConfig} userMode={userMode} />} />
<Route
path="import"
element={<ValidatorsImport network={stakerConfig.network} isMevBoostSet={stakerConfig.isMevBoostSet} />}
element={<ImportScreen network={stakerConfig.network} isMevBoostSet={stakerConfig.isMevBoostSet} />}
/>
<Route path="validatorsPerformance" element={<ValidatorsPerformance />} />
</Routes>
</BrowserRouter>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import FileDrop from "../FileDrop/FileDrop";
import { SecondaryInfoTypography } from "../../Styles/Typographies";
import FileDrop from "./components/FileDrop/FileDrop";
import { SecondaryInfoTypography } from "./Styles/Typographies";
import {
Box,
Button,
Expand All @@ -19,9 +19,9 @@ import { Link } from "react-router-dom";
import { DropEvent } from "react-dropzone";
import { useEffect, useState } from "react";
import BackupIcon from "@mui/icons-material/Backup";
import { ImportStatus, KeystoreInfo, TagSelectOption } from "../../types";
import FileCardList from "../FileCards/FileCardList";
import ImportDialog from "../Dialogs/ImportDialog";
import { ImportStatus, KeystoreInfo, TagSelectOption } from "./types";
import FileCardList from "./components/FileCards/FileCardList";
import ImportDialog from "./components/Dialogs/ImportDialog";
import {
Tag,
isValidEcdsaPubkey,
Expand All @@ -31,12 +31,12 @@ import {
Network
} from "@stakingbrain/common";
import CloseIcon from "@mui/icons-material/Close";
import { rpcClient } from "../../socket";
import { rpcClient } from "./socket";
import ArrowCircleLeftOutlinedIcon from "@mui/icons-material/ArrowCircleLeftOutlined";
import { extractPubkey } from "../../utils/dataUtils";
import { extractPubkey } from "./utils/dataUtils";
import type { CustomImportRequest, Web3signerPostResponse } from "@stakingbrain/brain";

export function ValidatorsImport({
export default function ImportScreen({
network,
isMevBoostSet
}: {
Expand Down
14 changes: 2 additions & 12 deletions packages/ui/src/components/TopBar/ToolBar.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import Toolbar from "@mui/material/Toolbar";
import { HeaderTypography } from "../../Styles/Typographies";
import { Box, Chip, Button } from "@mui/material";
import { Box, Chip } from "@mui/material";
import IconButton from "@mui/material/IconButton";
import LightModeIcon from "@mui/icons-material/LightMode";
import DarkModeIcon from "@mui/icons-material/DarkMode";
import UnfoldMoreIcon from "@mui/icons-material/UnfoldMore";
import UnfoldLessIcon from "@mui/icons-material/UnfoldLess";
import { Network } from "@stakingbrain/common";
import { Link } from "react-router-dom"; // Import Link from react-router-dom

export default function ToolBar({
mode,
Expand Down Expand Up @@ -50,15 +49,6 @@ export default function ToolBar({
alignItems: "center"
}}
>
<Button component={Link} to="/" color="inherit" sx={{ mx: 1 }}>
Home
</Button>
<Button component={Link} to="/import" color="inherit" sx={{ mx: 1 }}>
Import
</Button>
<Button component={Link} to="/validatorsPerformance" color="inherit" sx={{ mx: 1 }}>
Validators Performance
</Button>
<IconButton sx={{ ml: 1 }} onClick={() => setMode(mode === "dark" ? "light" : "dark")} color="inherit">
{mode === "dark" ? (
<LightModeIcon titleAccess="Set Light Mode" />
Expand All @@ -72,7 +62,7 @@ export default function ToolBar({
color="inherit"
>
{userMode === "basic" ? (
<UnfoldMoreIcon titleAccess="Expand Advanced Info" />
<UnfoldMoreIcon titleAccess="Expand Andanced Info" />
) : (
<UnfoldLessIcon titleAccess="Collapse Advanced Info" />
)}
Expand Down

This file was deleted.