From 7b166f6e65533942d15f992ff5c23f7e808a9b95 Mon Sep 17 00:00:00 2001 From: Ryan Goree Date: Tue, 29 Apr 2025 11:39:12 -0500 Subject: [PATCH 1/4] Make portfolio the index route --- apps/hyperdrive-trading/src/routeTree.gen.ts | 52 +++++++++---------- .../src/ui/landing/routes.ts | 2 +- .../src/ui/portfolio/routes.ts | 2 +- .../src/ui/routes/index.tsx | 13 +++-- .../src/ui/routes/landing.tsx | 18 +++++++ .../src/ui/routes/portfolio.tsx | 16 ------ 6 files changed, 52 insertions(+), 51 deletions(-) create mode 100644 apps/hyperdrive-trading/src/ui/routes/landing.tsx delete mode 100644 apps/hyperdrive-trading/src/ui/routes/portfolio.tsx diff --git a/apps/hyperdrive-trading/src/routeTree.gen.ts b/apps/hyperdrive-trading/src/routeTree.gen.ts index a54b59b41..835a70ada 100644 --- a/apps/hyperdrive-trading/src/routeTree.gen.ts +++ b/apps/hyperdrive-trading/src/routeTree.gen.ts @@ -15,11 +15,11 @@ import { Route as ChainlogImport } from "./ui/routes/chainlog"; import { Route as ErrorImport } from "./ui/routes/error"; import { Route as IndexImport } from "./ui/routes/index"; import { Route as IneligibleImport } from "./ui/routes/ineligible"; +import { Route as LandingImport } from "./ui/routes/landing"; import { Route as LeaderboardImport } from "./ui/routes/leaderboard"; import { Route as MarketChainIdAddressImport } from "./ui/routes/market.$chainId.$address"; import { Route as MintImport } from "./ui/routes/mint"; import { Route as PointsmarketsImport } from "./ui/routes/points_markets"; -import { Route as PortfolioImport } from "./ui/routes/portfolio"; import { Route as RestrictedcountriesImport } from "./ui/routes/restricted_countries"; // Create/Update Routes @@ -30,12 +30,6 @@ const RestrictedcountriesRoute = RestrictedcountriesImport.update({ getParentRoute: () => rootRoute, } as any); -const PortfolioRoute = PortfolioImport.update({ - id: "/portfolio", - path: "/portfolio", - getParentRoute: () => rootRoute, -} as any); - const PointsmarketsRoute = PointsmarketsImport.update({ id: "/points_markets", path: "/points_markets", @@ -54,6 +48,12 @@ const LeaderboardRoute = LeaderboardImport.update({ getParentRoute: () => rootRoute, } as any); +const LandingRoute = LandingImport.update({ + id: "/landing", + path: "/landing", + getParentRoute: () => rootRoute, +} as any); + const IneligibleRoute = IneligibleImport.update({ id: "/ineligible", path: "/ineligible", @@ -116,6 +116,13 @@ declare module "@tanstack/react-router" { preLoaderRoute: typeof IneligibleImport; parentRoute: typeof rootRoute; }; + "/landing": { + id: "/landing"; + path: "/landing"; + fullPath: "/landing"; + preLoaderRoute: typeof LandingImport; + parentRoute: typeof rootRoute; + }; "/leaderboard": { id: "/leaderboard"; path: "/leaderboard"; @@ -137,13 +144,6 @@ declare module "@tanstack/react-router" { preLoaderRoute: typeof PointsmarketsImport; parentRoute: typeof rootRoute; }; - "/portfolio": { - id: "/portfolio"; - path: "/portfolio"; - fullPath: "/portfolio"; - preLoaderRoute: typeof PortfolioImport; - parentRoute: typeof rootRoute; - }; "/restricted_countries": { id: "/restricted_countries"; path: "/restricted_countries"; @@ -168,10 +168,10 @@ export interface FileRoutesByFullPath { "/chainlog": typeof ChainlogRoute; "/error": typeof ErrorRoute; "/ineligible": typeof IneligibleRoute; + "/landing": typeof LandingRoute; "/leaderboard": typeof LeaderboardRoute; "/mint": typeof MintRoute; "/points_markets": typeof PointsmarketsRoute; - "/portfolio": typeof PortfolioRoute; "/restricted_countries": typeof RestrictedcountriesRoute; "/market/$chainId/$address": typeof MarketChainIdAddressRoute; } @@ -181,10 +181,10 @@ export interface FileRoutesByTo { "/chainlog": typeof ChainlogRoute; "/error": typeof ErrorRoute; "/ineligible": typeof IneligibleRoute; + "/landing": typeof LandingRoute; "/leaderboard": typeof LeaderboardRoute; "/mint": typeof MintRoute; "/points_markets": typeof PointsmarketsRoute; - "/portfolio": typeof PortfolioRoute; "/restricted_countries": typeof RestrictedcountriesRoute; "/market/$chainId/$address": typeof MarketChainIdAddressRoute; } @@ -195,10 +195,10 @@ export interface FileRoutesById { "/chainlog": typeof ChainlogRoute; "/error": typeof ErrorRoute; "/ineligible": typeof IneligibleRoute; + "/landing": typeof LandingRoute; "/leaderboard": typeof LeaderboardRoute; "/mint": typeof MintRoute; "/points_markets": typeof PointsmarketsRoute; - "/portfolio": typeof PortfolioRoute; "/restricted_countries": typeof RestrictedcountriesRoute; "/market/$chainId/$address": typeof MarketChainIdAddressRoute; } @@ -210,10 +210,10 @@ export interface FileRouteTypes { | "/chainlog" | "/error" | "/ineligible" + | "/landing" | "/leaderboard" | "/mint" | "/points_markets" - | "/portfolio" | "/restricted_countries" | "/market/$chainId/$address"; fileRoutesByTo: FileRoutesByTo; @@ -222,10 +222,10 @@ export interface FileRouteTypes { | "/chainlog" | "/error" | "/ineligible" + | "/landing" | "/leaderboard" | "/mint" | "/points_markets" - | "/portfolio" | "/restricted_countries" | "/market/$chainId/$address"; id: @@ -234,10 +234,10 @@ export interface FileRouteTypes { | "/chainlog" | "/error" | "/ineligible" + | "/landing" | "/leaderboard" | "/mint" | "/points_markets" - | "/portfolio" | "/restricted_countries" | "/market/$chainId/$address"; fileRoutesById: FileRoutesById; @@ -248,10 +248,10 @@ export interface RootRouteChildren { ChainlogRoute: typeof ChainlogRoute; ErrorRoute: typeof ErrorRoute; IneligibleRoute: typeof IneligibleRoute; + LandingRoute: typeof LandingRoute; LeaderboardRoute: typeof LeaderboardRoute; MintRoute: typeof MintRoute; PointsmarketsRoute: typeof PointsmarketsRoute; - PortfolioRoute: typeof PortfolioRoute; RestrictedcountriesRoute: typeof RestrictedcountriesRoute; MarketChainIdAddressRoute: typeof MarketChainIdAddressRoute; } @@ -261,10 +261,10 @@ const rootRouteChildren: RootRouteChildren = { ChainlogRoute: ChainlogRoute, ErrorRoute: ErrorRoute, IneligibleRoute: IneligibleRoute, + LandingRoute: LandingRoute, LeaderboardRoute: LeaderboardRoute, MintRoute: MintRoute, PointsmarketsRoute: PointsmarketsRoute, - PortfolioRoute: PortfolioRoute, RestrictedcountriesRoute: RestrictedcountriesRoute, MarketChainIdAddressRoute: MarketChainIdAddressRoute, }; @@ -283,10 +283,10 @@ export const routeTree = rootRoute "/chainlog", "/error", "/ineligible", + "/landing", "/leaderboard", "/mint", "/points_markets", - "/portfolio", "/restricted_countries", "/market/$chainId/$address" ] @@ -303,6 +303,9 @@ export const routeTree = rootRoute "/ineligible": { "filePath": "ineligible.tsx" }, + "/landing": { + "filePath": "landing.tsx" + }, "/leaderboard": { "filePath": "leaderboard.tsx" }, @@ -312,9 +315,6 @@ export const routeTree = rootRoute "/points_markets": { "filePath": "points_markets.tsx" }, - "/portfolio": { - "filePath": "portfolio.tsx" - }, "/restricted_countries": { "filePath": "restricted_countries.tsx" }, diff --git a/apps/hyperdrive-trading/src/ui/landing/routes.ts b/apps/hyperdrive-trading/src/ui/landing/routes.ts index 975948942..9bec4ec01 100644 --- a/apps/hyperdrive-trading/src/ui/landing/routes.ts +++ b/apps/hyperdrive-trading/src/ui/landing/routes.ts @@ -1 +1 @@ -export const LANDING_ROUTE = "/"; +export const LANDING_ROUTE = "/landing"; diff --git a/apps/hyperdrive-trading/src/ui/portfolio/routes.ts b/apps/hyperdrive-trading/src/ui/portfolio/routes.ts index 469e72e4d..5ceb5b40a 100644 --- a/apps/hyperdrive-trading/src/ui/portfolio/routes.ts +++ b/apps/hyperdrive-trading/src/ui/portfolio/routes.ts @@ -1 +1 @@ -export const PORTFOLIO_ROUTE = "/portfolio"; +export const PORTFOLIO_ROUTE = "/"; diff --git a/apps/hyperdrive-trading/src/ui/routes/index.tsx b/apps/hyperdrive-trading/src/ui/routes/index.tsx index 25bc525a6..cb30c986c 100644 --- a/apps/hyperdrive-trading/src/ui/routes/index.tsx +++ b/apps/hyperdrive-trading/src/ui/routes/index.tsx @@ -1,18 +1,17 @@ import { createFileRoute } from "@tanstack/react-router"; import { Page } from "src/ui/app/Page"; -import { Landing } from "src/ui/landing/Landing"; -import { LANDING_ROUTE } from "src/ui/landing/routes"; +import { Portfolio } from "src/ui/portfolio/Portfolio"; +import { PORTFOLIO_ROUTE } from "src/ui/portfolio/routes"; import { z } from "zod"; -export const Route = createFileRoute(LANDING_ROUTE)({ +export const Route = createFileRoute(PORTFOLIO_ROUTE)({ component: () => ( - + ), validateSearch: z.object({ - chains: z.array(z.number()).optional(), - assets: z.array(z.string()).optional(), - hideLowTvl: z.boolean().optional(), + position: z.enum(["longs", "shorts", "lp", "rewards"]).optional(), + account: z.string().optional(), }), }); diff --git a/apps/hyperdrive-trading/src/ui/routes/landing.tsx b/apps/hyperdrive-trading/src/ui/routes/landing.tsx new file mode 100644 index 000000000..25bc525a6 --- /dev/null +++ b/apps/hyperdrive-trading/src/ui/routes/landing.tsx @@ -0,0 +1,18 @@ +import { createFileRoute } from "@tanstack/react-router"; +import { Page } from "src/ui/app/Page"; +import { Landing } from "src/ui/landing/Landing"; +import { LANDING_ROUTE } from "src/ui/landing/routes"; +import { z } from "zod"; + +export const Route = createFileRoute(LANDING_ROUTE)({ + component: () => ( + + + + ), + validateSearch: z.object({ + chains: z.array(z.number()).optional(), + assets: z.array(z.string()).optional(), + hideLowTvl: z.boolean().optional(), + }), +}); diff --git a/apps/hyperdrive-trading/src/ui/routes/portfolio.tsx b/apps/hyperdrive-trading/src/ui/routes/portfolio.tsx deleted file mode 100644 index 7801452fc..000000000 --- a/apps/hyperdrive-trading/src/ui/routes/portfolio.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { createFileRoute } from "@tanstack/react-router"; -import { Page } from "src/ui/app/Page"; -import { Portfolio } from "src/ui/portfolio/Portfolio"; -import { PORTFOLIO_ROUTE } from "src/ui/portfolio/routes"; -import { z } from "zod"; -export const Route = createFileRoute(PORTFOLIO_ROUTE)({ - component: () => ( - - - - ), - validateSearch: z.object({ - position: z.enum(["longs", "shorts", "lp", "rewards"]).optional(), - account: z.string().optional(), - }), -}); From 4f7d79da5582d5e949e81adb23b4edfc76568567 Mon Sep 17 00:00:00 2001 From: Ryan Goree Date: Tue, 29 Apr 2025 11:48:35 -0500 Subject: [PATCH 2/4] Reduce footer --- .../src/ui/app/Footer/Footer.tsx | 140 +----------------- 1 file changed, 2 insertions(+), 138 deletions(-) diff --git a/apps/hyperdrive-trading/src/ui/app/Footer/Footer.tsx b/apps/hyperdrive-trading/src/ui/app/Footer/Footer.tsx index c81f02d5b..caa40b87f 100644 --- a/apps/hyperdrive-trading/src/ui/app/Footer/Footer.tsx +++ b/apps/hyperdrive-trading/src/ui/app/Footer/Footer.tsx @@ -2,17 +2,14 @@ import { Link } from "@tanstack/react-router"; import { ReactElement } from "react"; import { ExternalLink } from "src/ui/analytics/ExternalLink"; import { HyperdriveLogo } from "src/ui/app/Navbar/HyperdriveLogo"; -import FarcasterIcon from "src/ui/base/icons/farcaster"; -import LinkedInIcon from "src/ui/base/icons/linkedin"; -import XIcon from "src/ui/base/icons/x"; -import { CHAINLOG_ROUTE } from "src/ui/chainlog/routes"; import { privacyPolicyUrl } from "src/ui/compliance/privacyPolicy"; import { termsOfUseUrl } from "src/ui/compliance/termsOfUse"; + export default function Footer(): ReactElement { const footerTitleClassName = "daisy-footer-title text-neutral-content opacity-100"; // need to set opacity here to override daisy-footer-title return ( -