-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move capacity url fn to a separate file #473
Conversation
@@ -0,0 +1,14 @@ | |||
import { NetworkEnv } from "@threefold/grid_client"; | |||
|
|||
const network = process.env.NETWORK || (window as any).env.NETWORK; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line isn't needed, it can be passed from the calling function, the file should be only the getCapacityURL function parameterized in the a network var, the usage of that function should be in the right context
return `https://dashboard.${network}.grid.tf/explorer/statistics`; | ||
}; | ||
|
||
const capacityURL = getCapacityURL(network); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be called here
|
||
const capacityURL = getCapacityURL(network); | ||
|
||
export default capacityURL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the exported should be the getCapacityURL function, this variable capacityURL shouldn't exist, it needs to only exist at the caller frame
Awesome! |
Description
Related Issues
Checklist