diff --git a/.prettierignore b/.prettierignore index ee6d21ae..7d2ed38c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,7 +2,6 @@ node_modules/ coverage/ dist/ build/ -preact/ internals/ docs/ gql/ diff --git a/README.md b/README.md index 1e800895..fb30aa39 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,30 @@ # Pendulum Portal -[![Netlify Status](https://api.netlify.com/api/v1/badges/aa69406a-f4a1-4693-aed0-8478f1d1fabd/deploy-status)](https://app.netlify.com/sites/pendulum-portal-alpha/deploys) - ![TypeScript](https://img.shields.io/badge/-TypeSript-05122A?style=flat&logo=typescript) -![Preact](https://img.shields.io/badge/-Preact-05122A?style=flat&logo=preact) -![Vite](https://img.shields.io/badge/-Vite-05122A?style=flat&logo=vite) -![Tailwind CSS](https://img.shields.io/badge/-Tailwind-05122A?style=flat&logo=tailwindcss) +[![Netlify Status](https://api.netlify.com/api/v1/badges/aa69406a-f4a1-4693-aed0-8478f1d1fabd/deploy-status)](https://app.netlify.com/sites/pendulum-portal-alpha/deploys) + +![React](https://img.shields.io/badge/-React-05122A?style=flat&logo=react) +![TypeScript](https://img.shields.io/badge/-TypeSript-05122A?style=flat&logo=typescript) +![Vite](https://img.shields.io/badge/-Vite-05122A?style=flat&logo=vite) ![Polkadot](https://img.shields.io/badge/-Polkadot-05122A?style=flat&logo=polkadot) +An open-source repository for the [Pendulum Portal](https://portal.pendulumchain.org/), a frontend platform for +interacting with Pendulum Chain. + --- -Web application for Pendulum. This project was bootstrapped with [vite](https://vite.new/preact-ts) +## Table of Contents -## Run +- [Run](#run) +- [Build](#build) +- [Troubleshooting](#troubleshooting) + - [Missing Price Information](#missing-price-information) + - [Fixing Type Issues](#fixing-type-issues) + +--- -In the project directory, you can run: +### Run -### Install yarn - corepack +#### Install yarn with corepack Enable Corepack by executing the command `corepack enable`. Corepack is included by default in Node.js, it manages the Yarn version specified in the `packageManager` field. @@ -26,37 +35,40 @@ via npm - use Corepack instead. **Note:** If you are using Volta to manage your Node.js versions, you need to follow the instructions [here](https://yarnpkg.com/corepack#volta). -### `yarn install` +##### `yarn install` Install dependencies -### `yarn dev` +##### `yarn dev` -Runs the app in development mode.\ -Open [http://127.0.0.1:5173/](http://127.0.0.1:5173) to view it in the browser. +Runs the app in development mode. -## Build +--- + +### Build ### `yarn build` Builds the app for production to the `dist` folder.\ -It transpiles TypeScript, bundles Preact in production mode, splits and optimizes the builds for the best performance. +It transpiles TypeScript, bundles React in production mode, splits and optimizes the builds for the best performance. The build is minified and the filenames include the hashes.\ We call on `version.cjs` to show the commit version on the sidebar.\ We also create a file, on the fly, a file named `_redirects` that will serve the index.html instead of giving a 404 no matter what URL the browser requests. -## Troubleshooting +--- + +### Troubleshooting -### Missing price information +#### Missing price information If you are missing the price information about the assets on the dashboard page, you are probably experiencing a CORS problem with the batching server. If you want to fetch prices locally, you can use the proxy server available at [pendulum-tools](https://github.com/pendulum-chain/pendulum-tools). Change url in `src/hooks/usePriceFetcher.ts` file to `http://localhost:3000` -### Fixing type issues +#### Fixing type issues If you encounter issues with the IDE not detecting the type overwrites of the `@pendulum-chain/types` package properly, make sure that all the `@polkadot/xxx` packages match the same version used in the types package. It is also important diff --git a/config/babel.jest.cjs b/config/babel.jest.cjs deleted file mode 100644 index 1ff9b3ca..00000000 --- a/config/babel.jest.cjs +++ /dev/null @@ -1,26 +0,0 @@ -const babelJestMd = require('babel-jest'); -const babelJest = babelJestMd.__esModule ? babelJestMd.default : babelJestMd; - -module.exports = babelJest.createTransformer({ - presets: [ - [ - '@babel/preset-typescript', - { - jsxPragma: 'h', - }, - ], - '@babel/preset-env', - ], - plugins: [ - [ - '@babel/plugin-transform-react-jsx', - { - runtime: 'automatic', - importSource: 'preact', - }, - ], - '@babel/plugin-proposal-class-properties', - ], - babelrc: false, - configFile: false, -}); diff --git a/config/styleMock.js b/config/styleMock.js deleted file mode 100644 index f053ebf7..00000000 --- a/config/styleMock.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {}; diff --git a/index.html b/index.html index 633e71a1..7abf5e84 100644 --- a/index.html +++ b/index.html @@ -13,8 +13,8 @@ /> -
- + + diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 22d43d37..00000000 --- a/jest.config.js +++ /dev/null @@ -1,24 +0,0 @@ -export default { - roots: ['