Skip to content
Open
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
1 change: 1 addition & 0 deletions app/routes/markets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function MarketsPage() {
initialMenu: "/markets",
}}
footerProps={config.scaffold.footerProps}
bottomNavProps={config.scaffold.bottomNavProps}
routerAdapter={{
onRouteChange,
}}
Expand Down
1 change: 1 addition & 0 deletions app/routes/perp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default function PerpPage() {

return (
<Scaffold
bottomNavProps={config.scaffold.bottomNavProps}
mainNavProps={config.scaffold.mainNavProps}
footerProps={config.scaffold.footerProps}
routerAdapter={{
Expand Down
1 change: 1 addition & 0 deletions app/routes/portfolio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default function PortfolioLayout() {
...config.scaffold.mainNavProps,
initialMenu: "/portfolio",
}}
bottomNavProps={config.scaffold.bottomNavProps}
routerAdapter={{
onRouteChange,
}}
Expand Down
20 changes: 18 additions & 2 deletions app/utils/config.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { TradingPageProps } from "@orderly.network/trading";
import { FooterProps, MainNavWidgetProps } from "@orderly.network/ui-scaffold";
import { FooterProps, MainNavWidgetProps, BottomNavProps } from "@orderly.network/ui-scaffold";
import { AppLogos } from "@orderly.network/react-app";
import {
LeaderboardActiveIcon,
LeaderboardInactiveIcon,
PortfolioActiveIcon,
PortfolioInactiveIcon,
TradingActiveIcon,
TradingInactiveIcon,
} from '@orderly.network/ui';
import { OrderlyActiveIcon, OrderlyIcon } from "../components/icons/orderly";

export type OrderlyConfig = {
Expand All @@ -10,6 +18,7 @@ export type OrderlyConfig = {
scaffold: {
mainNavProps: MainNavWidgetProps;
footerProps: FooterProps;
bottomNavProps: BottomNavProps;
};
tradingPage: {
tradingViewConfig: TradingPageProps["tradingViewConfig"];
Expand All @@ -19,6 +28,13 @@ export type OrderlyConfig = {

const config: OrderlyConfig = {
scaffold: {
bottomNavProps: {
mainMenus: [
{ name: "Trading", href: "/", activeIcon: <TradingActiveIcon />, inactiveIcon: <TradingInactiveIcon /> },
{ name: "Portfolio", href: "/portfolio", activeIcon: <PortfolioActiveIcon />, inactiveIcon: <PortfolioInactiveIcon /> },
{ name: "Markets", href: "/markets", activeIcon: <LeaderboardActiveIcon />, inactiveIcon: <LeaderboardInactiveIcon /> },
]
},
mainNavProps: {
initialMenu: "/",
mainMenus: [
Expand Down Expand Up @@ -55,7 +71,7 @@ const config: OrderlyConfig = {
discordUrl: "https://discord.com/invite/orderlynetwork",
twitterUrl: "https://twitter.com/OrderlyNetwork",
trailing: <span className="oui-text-2xs oui-text-base-contrast-54">Charts powered by <a href="https://tradingview.com" target="_blank" rel="noopener noreferrer">TradingView</a></span>
},
}
},
orderlyAppProvider: {
appIcons: {
Expand Down