Skip to content
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

Merged
merged 2 commits into from
Feb 22, 2024
Merged

Add node status page #592

merged 2 commits into from
Feb 22, 2024

Conversation

grod220
Copy link
Collaborator

@grod220 grod220 commented Feb 22, 2024

Closes #513

Screen.Recording.2024-02-22.at.1.31.02.PM.mov

@hdevalence
Copy link
Member

This looks amazing!

Copy link
Contributor

@jessepinho jessepinho left a 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);
Copy link
Contributor

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?

Copy link
Collaborator Author

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 = () => {
Copy link
Contributor

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.

Copy link
Collaborator Author

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);
Copy link
Collaborator Author

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 = () => {
Copy link
Collaborator Author

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>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swapping to uint8ArrayToString

@grod220 grod220 merged commit 2b65c1a into main Feb 22, 2024
7 checks passed
@grod220 grod220 deleted the node-status-app branch February 22, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create standalone static site for node status page
3 participants