Catalog npm
PACKAGE EXPLORERView in registry

@0xkilo/components

npm

Pangolin Components

Versions collected14
Direct dependencies80From release 11.0.0
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 @pangolindex/sdk

or

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

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 14

Collected releases
VersionPublishedDirect dependenciesOpen version
11.0.0Registry latest24 May 202280
10.0.19 May 202266
10.0.09 May 202266
9.0.05 May 202266
3.0.120 Apr 202266
3.0.020 Apr 202266
2.0.328 Feb 202247
2.0.228 Feb 202247
2.0.126 Feb 202247
2.0.021 Feb 202247
1.0.621 Feb 202247
1.0.521 Feb 202247
1.0.221 Feb 202247
1.0.121 Feb 202247

Package advisories

0
No matching advisories collected

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

Repository

PENDING
pangolindex/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:d2020456001bae4e77a2cf84ed834a9402b681e0534c285d9e4eb9243985c493