-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add node status page #592
Add node status page #592
Conversation
6c8f163
to
e2e9d3a
Compare
This looks amazing! |
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.
Not sure what some of the fields mean (e.g., should channels really be base64ed? not sure how to review that) but otherwise LGTM!
|
||
export const FrontendReferral = () => { | ||
const onClickHandler = () => { | ||
window.open(import.meta.env.MODE === 'production' ? prodFrontend : devFrontend); |
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.
why not use process.env.NODE_ENV
? Not available in Vite?
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.
Because this code will be executed in a browser environment, getting env variables that way will throw. Vite provides this as a kind analogous way to access env variables with a client side app.
const VISIBILITY_STATE_CHANGE_DELAY = 800; | ||
|
||
// Meant to slow down the state transition from loading to idle so the UI can show a discernible spinner | ||
export const useDeceleratedFetchState = () => { |
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 hook name threw me off a bit. What about something like useDelayedIsLoading
? Hm... maybe it's not better. It just took me a minute to realize what this hook was actually doing.
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.
Renamed 👍
|
||
export const FrontendReferral = () => { | ||
const onClickHandler = () => { | ||
window.open(import.meta.env.MODE === 'production' ? prodFrontend : devFrontend); |
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.
Because this code will be executed in a browser environment, getting env variables that way will throw. Vite provides this as a kind analogous way to access env variables with a client side app.
const VISIBILITY_STATE_CHANGE_DELAY = 800; | ||
|
||
// Meant to slow down the state transition from loading to idle so the UI can show a discernible spinner | ||
export const useDeceleratedFetchState = () => { |
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.
Renamed 👍
</div> | ||
<div className='flex flex-col'> | ||
<strong>Channels</strong> | ||
<span className='ml-2'>{uint8ArrayToBase64(nodeInfo.channels)}</span> |
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.
Swapping to uint8ArrayToString
e2e9d3a
to
38b627f
Compare
Closes #513
Screen.Recording.2024-02-22.at.1.31.02.PM.mov