Skip to content

Commit

Permalink
Merge pull request #8 from threshold-network/overview-removal
Browse files Browse the repository at this point in the history
Remove "Overview" page

This pull request removes "Overview" page and related components.
  • Loading branch information
michalsmiarowski authored Dec 11, 2023
2 parents c73837c + 0f77020 commit 7a6d314
Show file tree
Hide file tree
Showing 26 changed files with 7 additions and 648 deletions.
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ const Routing = () => {
return (
<Routes>
<Route path="*" element={<Layout />}>
<Route index element={<Navigate to="overview" />} />
<Route index element={<Navigate to="tBTC" />} />
{pages.map(renderPageComponent)}
<Route path="*" element={<Navigate to="overview" />} />
<Route path="*" element={<Navigate to="tBTC" />} />
</Route>
</Routes>
)
Expand Down
80 changes: 0 additions & 80 deletions src/components/AnnouncementBanner/SecondaryAnnouncementBanner.tsx

This file was deleted.

81 changes: 0 additions & 81 deletions src/components/Modal/AnalyticsModal/index.tsx

This file was deleted.

5 changes: 2 additions & 3 deletions src/components/Navbar/NavbarComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
useColorModeValue,
H5,
} from "@threshold-network/components"
import { Routes, Route, Link, useMatch } from "react-router-dom"
import { Routes, Route, Link } from "react-router-dom"
import WalletConnectionAlert from "./WalletConnectionAlert"
import HamburgerButton from "./HamburgerButton"
import DarkModeSwitcher from "./DarkModeSwitcher"
Expand All @@ -35,15 +35,14 @@ const NavbarComponent: FC<NavbarComponentProps> = ({
}) => {
const isMobile = useChakraBreakpoint("md")
const IconComponent = useColorModeValue(ThresholdPurple, ThresholdWhite)
const isOverviewPage = useMatch("overview/*")
const borderBottomColor = useColorModeValue("gray.100", "gray.700")

return (
<>
<Box
p={6}
pr={{ base: 6, md: 24 }}
borderBottom={isOverviewPage ? undefined : "1px"}
borderBottom={"1px"}
borderColor={borderBottomColor}
display="flex"
>
Expand Down
8 changes: 0 additions & 8 deletions src/components/Sidebar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { NavItemDetail } from "./NavItem"
import {
IoHomeSharp,
IoLockClosedOutline,
IoLockClosedSharp,
IoChatbubbleEllipsesOutline,
Expand All @@ -10,7 +9,6 @@ import { useLocation } from "react-router-dom"
import { useMemo } from "react"
import DesktopSidebar from "./DesktopSidebar"
import MobileSidebar from "./MobileSidebar"
import { IoHomeOutlineSharp } from "../../static/icons/IoHomeOutlineSharp"
import { tBTCFill } from "../../static/icons/tBTCFill"
import { tBTCOutline } from "../../static/icons/tBTCOutline"
import { featureFlags } from "../../constants"
Expand All @@ -19,12 +17,6 @@ const Sidebar = () => {
const { pathname } = useLocation()
const navItems: NavItemDetail[] = useMemo(() => {
const navItems = [
{
text: "Overview",
activeIcon: IoHomeSharp,
passiveIcon: IoHomeOutlineSharp,
href: "/overview",
},
{
text: "Staking",
activeIcon: IoLockClosedSharp,
Expand Down
4 changes: 2 additions & 2 deletions src/components/tBTC/Stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ExternalHref } from "../../enums"
import { RecentDeposit } from "../../hooks/tbtc"
import Link from "../Link"

export type TvlProps = {
type TvlProps = {
tvl: string
tvlInUSD: string
}
Expand All @@ -28,7 +28,7 @@ export const Tvl: FC<TvlProps> = ({ tvl, tvlInUSD }) => {
)
}

export type ProtocolHistoryProps = {
type ProtocolHistoryProps = {
deposits: RecentDeposit[]
}

Expand Down
1 change: 0 additions & 1 deletion src/enums/externalHref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ export enum ExternalHref {
mintersAndGuardiansDocs = "https://blog.threshold.network/minters-guardians-and-a-strong-tbtc/",
tBTCDuneDashboard = "https://dune.com/threshold/tbtc",
delight = "https://delightlabs.io",
coveragePoolsDocs = "https://docs.threshold.network/applications/tbtc-v2/coverage-pool",
runningNodeDocs = "https://docs.threshold.network/staking-and-running-a-node/running-a-node",
}
1 change: 0 additions & 1 deletion src/enums/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export enum ModalType {
ConfirmDeauthorization = "CONFIRM_DEAUTHORIZATION",
DeauthorizationCompleted = "DEAUTHORIZATION_COMPLETED",
DeauthorizationInitiated = "DEAUTHORIZATION_INITIATED",
Analytics = "ANALYTICS",
NewTBTCApp = "NEW_TBTC_APP",
FeedbackSubmission = "FEEDBACK_SUBMIT",
GenerateNewDepositAddress = "TBTC_GENERATE_NEW_DEPOSIT_ADDRESS",
Expand Down
23 changes: 0 additions & 23 deletions src/pages/Overview/AnalyticsBanner.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions src/pages/Overview/Network/CardTemplate.tsx

This file was deleted.

35 changes: 0 additions & 35 deletions src/pages/Overview/Network/StakingOverview.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions src/pages/Overview/Network/TotalValueLocked.tsx

This file was deleted.

Loading

0 comments on commit 7a6d314

Please sign in to comment.