Skip to content

Commit

Permalink
fix/page-head (#12)
Browse files Browse the repository at this point in the history
* add pagehead to app

* remove pie when no balance
  • Loading branch information
baktun14 authored Sep 6, 2023
1 parent b4c300e commit f688ad2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions deploy-web/src/components/home/YourAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ export const YourAccount: React.FunctionComponent<Props> = ({ balances, isLoadin
>
{hasBalance && (
<Box>
<BalancePie data={filteredAktData} getColor={_getColor} label="AKT" />
<BalancePie data={filteredUsdcData} getColor={_getColor} label="USDC" />
{filteredAktData.length > 0 && <BalancePie data={filteredAktData} getColor={_getColor} label="AKT" />}
{filteredUsdcData.length > 0 && <BalancePie data={filteredUsdcData} getColor={_getColor} label="USDC" />}
</Box>
)}

Expand Down
3 changes: 1 addition & 2 deletions deploy-web/src/components/layout/PageHead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Props = {
children?: ReactNode;
};

const PageHead: React.FunctionComponent<Props> = ({}) => {
export const PageHead: React.FunctionComponent<Props> = ({}) => {
return (
<>
<Head>
Expand Down Expand Up @@ -43,4 +43,3 @@ const PageHead: React.FunctionComponent<Props> = ({}) => {
</>
);
};
export default PageHead;
5 changes: 2 additions & 3 deletions deploy-web/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { UserProvider } from "@auth0/nextjs-auth0/client";
import { AddressBookProvider } from "@src/context/AddressBookProvider";
import { Provider } from "jotai";
import { usePreviousRoute } from "@src/hooks/usePreviousRoute";
import { PageHead } from "@src/components/layout/PageHead";

interface Props extends AppProps {
emotionCache?: EmotionCache;
Expand Down Expand Up @@ -62,9 +63,7 @@ const App: React.FunctionComponent<Props> = ({ Component, pageProps, emotionCach

return (
<>
<Head>
<title>Cloudmos</title>
</Head>
<PageHead />

<CacheProvider value={emotionCache}>
<QueryClientProvider client={queryClient}>
Expand Down

0 comments on commit f688ad2

Please sign in to comment.