Overview of frontend pages for staking and farming
At the beginning of this chapter, we will walk through the structure of the frontend code and an overview of the pages we are building in this section. Because they depend on the smart contracts that we implemented in Chapter 9, Building Smart Contracts for Staking and Farming we encourage you to follow the instructions in this chapter based on the completed code of Chapter 9, Building Smart Contracts for Staking and Farming or you can pull the code from the chapter10-start
branch from the GitHub repository of this book.
Similar to what we created for liquidity management pages in Chapter 6, Implementing a Liquidity Management Frontend with Web3, the staking feature includes multiple pages. Each page can be accessed via one of the URL routes defined in a React router component. Now, we need to create a folder at src/frontend/features/Stake
to accommodate the router component and other pages for staking. Here are the six JavaScript...