2ndtlmining / Fluxnode

Fluxnode Website
https://fluxnode.app.runonflux.io/
5 stars 6 forks source link

Code Simplification #94

Closed 2ndtlmining closed 1 year ago

2ndtlmining commented 1 year ago

Problem Statement

New addition of the Home page brought about some duplication of code that is not needed. The code between Home and Main folders are duplicated.

Simplifications needed

  1. Remove duplicate folders not needed in Home folder:
image

Example not sure if Best Uptime is used in home page, or Payout timer, Wallet nodes, Most hosted, Parallel Assets or Payout timer is used. Try to only keep whats needed in the home page making it easier to read and maintain.

  1. Update APIdata.js file: APIDATA.js file now is duplicated. Either add the new API information to the Main APIdata.js or just include the relevant API data for Main api file. Probably call it something different.
  2. Maintain Variables files: Update the variables file to only have variables such as Kadena and Presearch making it easier to add more in the future or swap them out. Thus in API file just call them app 1 and app 2 and maintain the actual Docker repo in the variables file:
image image
  1. Remove data not needed: Think some data was copied across but not needed, thus ending up either not used or just commented. Look to remove those to only have relevant information. This specifically relate to the Home folder file contents such as:
image image

Can see code related to wallets in home page section, dollar signs that is commented ect. Thus a lot of things copied but never used thus creating a little bit of clutter.

2ndtlmining commented 1 year ago

@Usman34266 Thanks a lot. Big cleanup and its very much appreciated. Think its all good just need to wrap my head around the counting :). There is still a bunch of stuff not needed in the api file but think i can also remove it

image