Skip to content

Commit

Permalink
0.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ivansglazunov committed Jul 12, 2024
1 parent 6512ff3 commit 023c583
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deep-foundation/perception-app",
"version": "0.0.4",
"version": "0.0.5",
"description": "",
"license": "Unlicense",
"main": "./bin/server.js",
Expand Down
21 changes: 16 additions & 5 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { useQueryStore } from '@deep-foundation/store/query';
import { useTranslation } from 'next-i18next';
import getConfig from 'next/config';
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import { memo, useEffect, useState } from 'react';
import { IoEnterOutline, IoExitOutline } from "react-icons/io5";
import { GrUserAdmin } from "react-icons/gr";
import pckg from '../package.json';
Expand Down Expand Up @@ -97,15 +97,26 @@ export const LayoutButton = ({

export function Status() {
const deep = useDeep();
// const status = deep.client.useApolloNetworkStatus();
const status = {}
return <>
{deep ? <StatusWithDeep/> : <CircularProgress
size="1em" isIndeterminate={false} value={100} color={(deep && deep?.linkId) ? 'cyan' : 'red'}
/>}
</>;
}

export const StatusWithDeep = memo(function StatusWithDeep() {
const deep = useDeep();
const status = deep?.client?.useApolloNetworkStatus();
console.log('status', status);
return <>
<CircularProgress
size="1em" isIndeterminate={false} value={100} color={(deep && deep?.linkId) ? 'cyan' : 'red'}
size="1em" isIndeterminate={!!status.numPendingQueries} value={100} color={(deep && deep?.linkId) ? 'cyan' : 'red'}
/>
<Text size="xxs" position='absolute' top='0.5em' right='0.5em'>
{status.numPendingQueries}
</Text>
</>;
}
}, () => true);

export function Auth() {
const deep = useDeep();
Expand Down

0 comments on commit 023c583

Please sign in to comment.