Catalog npm
PACKAGE EXPLORERView in registry

@0xkilo/testref

npm

Pangolin Components

Versions collected8
Direct dependencies76From release 0.0.7
Last observed21 Oct, 09:01 UTC

README

Current package documentation

components

Ui Kit for Pangolin

Installation

yarn add @pangolindex/components @gelatonetwork/limit-orders-react@2.4.0

or

npm install @pangolindex/components @gelatonetwork/limit-orders-react@2.4.0

Getting started

Wrap your app with the PangolinProvider and pass the pangolin reducers into your redux store.

In your store pass the gelato reducers:

import { configureStore, getDefaultMiddleware } from "@reduxjs/toolkit";
import { save, load } from "redux-localstorage-simple";
import {
  pangolinReducers,
  PANGOLIN_PERSISTED_KEYS,
} from "@pangolindex/components";

const PERSISTED_KEYS: string[] = ["your_keys", ...PANGOLIN_PERSISTED_KEYS];

const store = configureStore({
  reducer: {
    ...your_reducers,
    ...pangolinReducers,
  },
  middleware: [
    ...getDefaultMiddleware({ thunk: false }),
    save({ states: PERSISTED_KEYS }),
  ],
  preloadedState: load({ states: PERSISTED_KEYS }),
});

export default store;

In your main file wrap your app with PangolinProvider:

import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
import store from "./state";
import { useWeb3React, Web3ReactProvider } from "@web3-react/core";
import { Provider } from "react-redux";
import { PangolinProvider } from "@pangolindex/components";
import getLibrary from "./utils/getLibrary";

const AppProvider = () => {
  const { library, account, chainId } = useWeb3React();

  return (
    <PangolinProvider
      library={library}
      chainId={chainId}
      account={account as string}
    >
      <App />
    </PangolinProvider>
  );
};

ReactDOM.render(
  <React.StrictMode>
    <Web3ReactProvider getLibrary={getLibrary}>
      <Provider store={store}>
        <AppProvider />
      </Provider>
    </Web3ReactProvider>
  </React.StrictMode>,
  document.getElementById("root")
);

development flow

  1. do yarn in components
  2. do yarn dev which will watch for any files changes and recompiles files
  3. do yalc link "@pangolindex/components" in the project where you want to use components

Incase react hook violation error comes, in that case follow below steps also.

  1. do yarn link in <project_root>/node_modules/react.
  2. do yarn link react in components which will symlink react which are being used by project.

Publish flow

  • do yarn publish which will build the components and publish to npm.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 8

Collected releases
VersionPublishedDirect dependenciesOpen version
0.0.7Registry latest4 May 202276
0.0.64 May 202276
0.0.54 May 202276
0.0.44 May 202276
0.0.34 May 202274
0.0.24 May 202274
0.0.14 May 202266
0.0.04 May 202266

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
wagmiog/components

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:01 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:d30145f43ab282e0046f8a88050f5abcc93d509d8023cf5db2a5e7f511195177