npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@orderly.network/portfolio

v2.8.6

Published

If you are using the layout components from @orderly.network/portfolio directly and are an existing user, when you want to use mobile pages, we have added HistoryPage and SettingPage. You can add the corresponding routes to fully utilize the mobile functi

Downloads

3,150

Readme

@orderly.network/portfolio Mobile Pages Usage Guide

If you are using the layout components from @orderly.network/portfolio directly and are an existing user, when you want to use mobile pages, we have added HistoryPage and SettingPage. You can add the corresponding routes to fully utilize the mobile functionality.

Component Import Paths

HistoryPage Component

import { HistoryModule } from "@orderly.network/portfolio";

// Available components
const { HistoryPage, HistoryWidget } = HistoryModule;

SettingPage Component

import { SettingModule } from "@orderly.network/portfolio";

// Available components
const { SettingPage, SettingWidget } = SettingModule;

Route Path Configuration

Based on the PortfolioLeftSidebarPath enum definition, the standard route paths for mobile pages are:

// History page path
const HISTORY_PATH = "/portfolio/history";

// Settings page path
const SETTING_PATH = "/portfolio/setting";

Complete Route Configuration Examples

React Router Configuration Example

import { Routes, Route } from "react-router-dom";
import { HistoryModule, SettingModule } from "@orderly.network/portfolio";

const { HistoryPage } = HistoryModule;
const { SettingPage } = SettingModule;

function App() {
  return (
    <Routes>
      {/* Other routes */}
      <Route path="/portfolio" element={<PortfolioOverview />} />
      <Route path="/portfolio/positions" element={<PositionsPage />} />
      <Route path="/portfolio/orders" element={<OrdersPage />} />

      {/* New mobile page routes */}
      <Route path="/portfolio/history" element={<HistoryPage />} />
      <Route path="/portfolio/setting" element={<SettingPage />} />
    </Routes>
  );
}

Next.js App Router Configuration Example

// app/portfolio/history/page.tsx
import { HistoryModule } from "@orderly.network/portfolio";

const { HistoryPage } = HistoryModule;

export default function HistoryPageRoute() {
  return <HistoryPage />;
}
// app/portfolio/setting/page.tsx
import { SettingModule } from "@orderly.network/portfolio";

const { SettingPage } = SettingModule;

export default function SettingPageRoute() {
  return <SettingPage />;
}

Next.js Pages Router Configuration Example

// pages/portfolio/history.tsx
import { HistoryModule } from "@orderly.network/portfolio";

const { HistoryPage } = HistoryModule;

export default HistoryPage;
// pages/portfolio/setting.tsx
import { SettingModule } from "@orderly.network/portfolio";

const { SettingPage } = SettingModule;

export default SettingPage;

Mobile Navigation Configuration

If you are using Portfolio's layout components, mobile navigation will automatically handle these routes. Ensure your routerAdapter is properly configured:

import { PortfolioLayoutWidget } from "@orderly.network/portfolio";

const routerAdapter = {
  onRouteChange: ({ href, name }) => {
    // Handle route navigation logic
    router.push(href);
  },
  currentPath: router.pathname, // Current path
};

function PortfolioLayout({ children }) {
  return (
    <PortfolioLayoutWidget
      routerAdapter={routerAdapter}
      current={router.pathname}
    >
      {children}
    </PortfolioLayoutWidget>
  );
}

Feature Description

HistoryPage

  • Function: Display user's trading history records
  • Includes: Deposit/withdrawal history, funding fee history, distribution history
  • Mobile Optimization: Automatically adapts to mobile interface, provides touch-friendly interactive experience

SettingPage

  • Function: User settings page
  • Includes: Account settings, preference settings, etc.
  • Mobile Optimization: Responsive design, supports mobile operations

Important Notes

  1. Path Consistency: Ensure route paths are consistent with PortfolioLeftSidebarPath enum values
  2. Mobile Detection: Components automatically detect mobile environment and render corresponding UI
  3. Dependency Requirements: Ensure all necessary dependency packages are installed, including @orderly.network/ui, @orderly.network/i18n, etc.
  4. RouterAdapter: Ensure proper implementation of routerAdapter interface to support page navigation functionality