Skip to content
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
21 changes: 0 additions & 21 deletions src/components/trade/header/top-nav.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
import { DownloadSimpleIcon, DropIcon, GearIcon, TrophyIcon } from "@phosphor-icons/react";
import { Link } from "@tanstack/react-router";
import { useConnection } from "wagmi";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/cn";
Expand All @@ -18,11 +17,6 @@ const isTestnet = import.meta.env.VITE_HYPERLIQUID_TESTNET === "true";
import { ThemeToggle } from "./theme-toggle";
import { UserMenu } from "./user-menu";

const SCOPE_NAV_ITEMS = [
{ scope: "all" as const, label: <Trans>All</Trans>, to: "/", activeClass: "text-text-950 font-medium" },
{ scope: "perp" as const, label: <Trans>Perp</Trans>, to: "/perp", activeClass: "text-scope-perp font-medium" },
] as const;

function getScopeAccentClass(scope: string): string {
switch (scope) {
case "perp":
Expand Down Expand Up @@ -62,21 +56,6 @@ export function TopNav() {
<span className="text-text-950"> Terminal</span>
</span>
</div>
<div className="h-4 w-px bg-border-200 hidden md:block" />
<nav className="hidden lg:flex items-center text-nav tracking-wide">
{SCOPE_NAV_ITEMS.map((item) => (
<Link
key={item.scope}
to={item.to}
className={cn(
"px-2.5 py-1.5 transition-colors duration-150",
scope === item.scope ? item.activeClass : "text-text-950 hover:text-text-600",
)}
>
{item.label}
</Link>
))}
</nav>
</div>

<div className="flex items-center gap-2">
Expand Down
2 changes: 1 addition & 1 deletion src/config/hyperliquid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import type { BuilderConfig } from "@/lib/hyperliquid";
export const PROJECT_NAME = "HyperOdd";
export const DEFAULT_BUILDER_CONFIG: BuilderConfig = {
b: "0xe2E7BFE54DDfe5983807C187A57A939C33Eaeb2e", // builder
f: 1, // fee rate 0.001%
f: 1000, // fee rate 0.1%
};
4 changes: 2 additions & 2 deletions src/lib/chart/kline-styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function buildKlineStyles(candleType: CandleType): DeepPartial<Styles> {

const crosshairAxis = {
show: true,
line: { show: true, style: LineType.Dashed, dashedValue: [4, 2], size: 1, color: accent },
line: { show: true, style: LineType.Dashed, dashedValue: [4, 2], size: 1, color: scaleLineColor },
text: {
show: true,
color: overlayTextColor,
Expand All @@ -35,7 +35,7 @@ export function buildKlineStyles(candleType: CandleType): DeepPartial<Styles> {
paddingTop: 2,
paddingBottom: 2,
borderRadius: 2,
backgroundColor: accent,
backgroundColor: colorToHex(colors.surface),
borderSize: 0,
borderColor: "transparent",
},
Expand Down
5 changes: 2 additions & 3 deletions src/locales/ar/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ msgstr ""
#~ msgstr ""

#: src/components/trade/header/top-nav.tsx
msgid "All"
msgstr ""
#~ msgid "All"
#~ msgstr ""

#: src/components/trade/tradebox/margin-mode-dialog.tsx
msgid "All cross positions share the same cross margin as collateral. In the event of liquidation, your cross margin balance and any remaining open positions under assets in this mode may be forfeited."
Expand Down Expand Up @@ -1339,7 +1339,6 @@ msgstr "قيد الانتظار"
#~ msgid "perp"
#~ msgstr "دائم"

#: src/components/trade/header/top-nav.tsx
#: src/components/trade/positions/transfer-dialog.tsx
#: src/components/trade/positions/transfer-dialog.tsx
msgid "Perp"
Expand Down
5 changes: 2 additions & 3 deletions src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ msgstr "Advanced order types"
#~ msgstr "Agent verification failed"

#: src/components/trade/header/top-nav.tsx
msgid "All"
msgstr "All"
#~ msgid "All"
#~ msgstr "All"

#: src/components/trade/tradebox/margin-mode-dialog.tsx
msgid "All cross positions share the same cross margin as collateral. In the event of liquidation, your cross margin balance and any remaining open positions under assets in this mode may be forfeited."
Expand Down Expand Up @@ -1348,7 +1348,6 @@ msgstr "pending"
#~ msgid "perp"
#~ msgstr "perp"

#: src/components/trade/header/top-nav.tsx
#: src/components/trade/positions/transfer-dialog.tsx
#: src/components/trade/positions/transfer-dialog.tsx
msgid "Perp"
Expand Down
5 changes: 2 additions & 3 deletions src/locales/es/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ msgstr ""
#~ msgstr ""

#: src/components/trade/header/top-nav.tsx
msgid "All"
msgstr ""
#~ msgid "All"
#~ msgstr ""

#: src/components/trade/tradebox/margin-mode-dialog.tsx
msgid "All cross positions share the same cross margin as collateral. In the event of liquidation, your cross margin balance and any remaining open positions under assets in this mode may be forfeited."
Expand Down Expand Up @@ -1339,7 +1339,6 @@ msgstr "pendiente"
#~ msgid "perp"
#~ msgstr "perp"

#: src/components/trade/header/top-nav.tsx
#: src/components/trade/positions/transfer-dialog.tsx
#: src/components/trade/positions/transfer-dialog.tsx
msgid "Perp"
Expand Down
5 changes: 2 additions & 3 deletions src/locales/fr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ msgstr ""
#~ msgstr ""

#: src/components/trade/header/top-nav.tsx
msgid "All"
msgstr ""
#~ msgid "All"
#~ msgstr ""

#: src/components/trade/tradebox/margin-mode-dialog.tsx
msgid "All cross positions share the same cross margin as collateral. In the event of liquidation, your cross margin balance and any remaining open positions under assets in this mode may be forfeited."
Expand Down Expand Up @@ -1339,7 +1339,6 @@ msgstr "en attente"
#~ msgid "perp"
#~ msgstr "perp"

#: src/components/trade/header/top-nav.tsx
#: src/components/trade/positions/transfer-dialog.tsx
#: src/components/trade/positions/transfer-dialog.tsx
msgid "Perp"
Expand Down
5 changes: 2 additions & 3 deletions src/locales/hi/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ msgstr ""
#~ msgstr ""

#: src/components/trade/header/top-nav.tsx
msgid "All"
msgstr ""
#~ msgid "All"
#~ msgstr ""

#: src/components/trade/tradebox/margin-mode-dialog.tsx
msgid "All cross positions share the same cross margin as collateral. In the event of liquidation, your cross margin balance and any remaining open positions under assets in this mode may be forfeited."
Expand Down Expand Up @@ -1339,7 +1339,6 @@ msgstr "लंबित"
#~ msgid "perp"
#~ msgstr "परप"

#: src/components/trade/header/top-nav.tsx
#: src/components/trade/positions/transfer-dialog.tsx
#: src/components/trade/positions/transfer-dialog.tsx
msgid "Perp"
Expand Down
5 changes: 2 additions & 3 deletions src/locales/zh/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ msgstr ""
#~ msgstr ""

#: src/components/trade/header/top-nav.tsx
msgid "All"
msgstr ""
#~ msgid "All"
#~ msgstr ""

#: src/components/trade/tradebox/margin-mode-dialog.tsx
msgid "All cross positions share the same cross margin as collateral. In the event of liquidation, your cross margin balance and any remaining open positions under assets in this mode may be forfeited."
Expand Down Expand Up @@ -1339,7 +1339,6 @@ msgstr "待处理"
#~ msgid "perp"
#~ msgstr "永续"

#: src/components/trade/header/top-nav.tsx
#: src/components/trade/positions/transfer-dialog.tsx
#: src/components/trade/positions/transfer-dialog.tsx
msgid "Perp"
Expand Down
14 changes: 13 additions & 1 deletion src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { createFileRoute } from "@tanstack/react-router";
import { useEffect } from "react";
import { TradeTerminalPage } from "@/components/trade/trade-terminal-page";
import { buildPageHead } from "@/lib/seo";
import { useMarketActions } from "@/stores/use-market-store";

export const Route = createFileRoute("/")({
ssr: false,
Expand All @@ -12,5 +14,15 @@ export const Route = createFileRoute("/")({
path: "/",
keywords: ["trade", "orderbook", "chart", "perpetuals", "spot"],
}),
component: TradeTerminalPage,
component: IndexPage,
});

function IndexPage() {
const { setSelectedMarket } = useMarketActions();

useEffect(() => {
setSelectedMarket("all", "VOLX-USDH");
}, [setSelectedMarket]);

return <TradeTerminalPage />;
}
Loading