Skip to content

Commit

Permalink
review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
grod220 committed Feb 22, 2024
1 parent a79aaa7 commit 38b627f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/node-status/src/components/header.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Link } from 'react-router-dom';
import { LineWave } from 'react-loader-spinner';
import { cn } from '@penumbra-zone/ui/lib/utils.ts';
import { useDeceleratedFetchState } from '../fetching/refetch-hook.ts';
import { useDelayedIsLoading } from '../fetching/refetch-hook.ts';

export const Header = () => {
const isLoading = useDeceleratedFetchState();
const isLoading = useDelayedIsLoading();

return (
<header className='z-10 flex w-full flex-col items-center justify-between px-6 md:h-[82px] md:flex-row md:gap-12 md:px-12'>
Expand Down
4 changes: 2 additions & 2 deletions apps/node-status/src/components/node-info.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useLoaderData } from 'react-router-dom';
import { uint8ArrayToBase64 } from '@penumbra-zone/types';
import { uint8ArrayToString } from '@penumbra-zone/types';
import { Card, Identicon } from '@penumbra-zone/ui';
import { IndexLoaderResponse } from '../fetching/loader.ts';

Expand Down Expand Up @@ -43,7 +43,7 @@ export const NodeInfo = () => {
</div>
<div className='flex flex-col'>
<strong>Channels</strong>
<span className='ml-2'>{uint8ArrayToBase64(nodeInfo.channels)}</span>
<span className='ml-2'>{uint8ArrayToString(nodeInfo.channels)}</span>
</div>
<div className='flex flex-col'>
<strong>Moniker</strong>
Expand Down
2 changes: 1 addition & 1 deletion apps/node-status/src/fetching/refetch-hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const useRefetchStatusOnInterval = () => {
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 = () => {
export const useDelayedIsLoading = () => {
const { state } = useRevalidator();

const [isVisible, setIsVisible] = useState(false);
Expand Down

0 comments on commit 38b627f

Please sign in to comment.