Skip to content

Conversation

@grod220
Copy link
Contributor

@grod220 grod220 commented Feb 22, 2024

Closes #513

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

@hdevalence
Copy link
Contributor

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
Contributor 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
Contributor 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
Contributor 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 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
Contributor 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
@grod220 grod220 deleted the node-status-app branch February 22, 2024 20:54
TalDerei pushed a commit that referenced this pull request Mar 6, 2025
* Add node status page

* review updates
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

4 participants