Go to file
rjpeterson 0ef18df358
Make orderbook depth change dynamically with layout (#41)
* Make orderbook size change dynamically with layout

This change causes the depth value passed to the orderbook component to change in response to the height of the resizable container.
This allows users to show more or less of the depth of the orderbook depending on their preference.
Old behavior was to always show a depth of 8 rows regardless of the size of the container.

* revert changes to yarn.lock

* adjust depth formula, add assymetric depth in vertical mode

The depth of the orderbook now more closely matches the size of the container.
The scrollbar has also been disabled in the orderbook panel to enable the space to be used as efficiently as possible without the annoyance of the scrollbar appearing.
The vertical orientation of the orderbook now allows an odd number of ask rows and an even number of bid rows if it is able to use more of the available space.

* Make orderbook depth adjust on breakpoint change

Add orderbookDepth state which is managed by onBreakpointChange and onLayoutChange functions.

* Add orderbookDepth value to useMangoStore

* Simplify state management and move orderbook adjustments into useEffect

Remove orderbook state object from useMangoStore
This change solves the issue of the orderbook not adjusting on a new session, as well eliminates instances of repeated calls to adjustOrderBook()

* Fix lodash compile errors
2021-07-05 22:10:35 +02:00
@types use separate connections for websockets and one off transactions 2021-04-20 17:00:45 -04:00
components Make orderbook depth change dynamically with layout (#41) 2021-07-05 22:10:35 +02:00
hooks User account history (#33) 2021-06-22 19:50:40 +02:00
pages Stats page alignment (#28) 2021-06-22 13:49:52 +02:00
public Added icon and fixed a check for token length 2021-05-20 14:35:35 +03:00
stores User account history (#33) 2021-06-22 19:50:40 +02:00
styles User account page (#22) 2021-06-05 10:11:44 -04:00
test fixes for husky commit hooks 2021-04-10 11:56:14 -04:00
utils User account history (#33) 2021-06-22 19:50:40 +02:00
.babelrc fix babelrc to handle logical assignment ops 2021-06-16 12:05:03 -04:00
.eslintignore fixes for husky commit hooks 2021-04-10 11:56:14 -04:00
.eslintrc.json add trade form component 2021-04-02 14:26:21 -04:00
.gitignore Initial commit from Create Next App 2021-03-26 12:44:55 -04:00
.nvmrc Add UiLock toggle and themed the stats page 2021-04-13 12:51:42 -04:00
.prettierignore add husky pre-commit for linting and formatting 2021-04-14 14:49:01 -04:00
.prettierrc Initial commit from Create Next App 2021-03-26 12:44:55 -04:00
README.md Remove todo from readme 2021-05-09 23:45:31 -04:00
jest.config.js Initial commit from Create Next App 2021-03-26 12:44:55 -04:00
netlify.toml testing netlify deploy 2021-04-13 15:48:36 -04:00
next-env.d.ts Initial commit from Create Next App 2021-03-26 12:44:55 -04:00
next.config.js add Lagzda's alerts 2021-04-24 22:10:28 -04:00
package.json use latest mango-client 2021-07-04 11:15:34 -04:00
postcss.config.js upgrade tailwind and next 2021-04-16 11:04:04 -04:00
tailwind.config.js User account page (#22) 2021-06-05 10:11:44 -04:00
tsconfig.json hide some ui changes so we can deploy 2021-04-19 12:15:49 -04:00
yarn.lock use latest mango-client 2021-07-04 11:15:34 -04:00

README.md

Mango UI V2

Uses:

Run

yarn
yarn dev