Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DaMandal0rian committed May 7, 2024
1 parent 2800cf2 commit 9b2887e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 49 deletions.
20 changes: 10 additions & 10 deletions lib/hooks/useNavItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ export default function useNavItems(): ReturnType {
} : null;

const verifiedContracts: NavItem | null =
{
text: 'Verified contracts',
nextRoute: { pathname: '/verified-contracts' as const },
icon: 'verified',
isActive: pathname === '/verified-contracts',
};
{
text: 'Verified contracts',
nextRoute: { pathname: '/verified-contracts' as const },
icon: 'verified',
isActive: pathname === '/verified-contracts',
};
const ensLookup = config.features.nameService.isEnabled ? {
text: 'Name services lookup',
nextRoute: { pathname: '/name-domains' as const },
Expand All @@ -73,13 +73,13 @@ export default function useNavItems(): ReturnType {
isActive: pathname === '/validators',
} : null;
const rollupDeposits = {
text: `Deposits (L1${ rightLineArrow }L2)`,
text: `Deposits (L1${rightLineArrow}L2)`,
nextRoute: { pathname: '/deposits' as const },
icon: 'arrows/south-east',
isActive: pathname === '/deposits',
};
const rollupWithdrawals = {
text: `Withdrawals (L2${ rightLineArrow }L1)`,
text: `Withdrawals (L2${rightLineArrow}L1)`,
nextRoute: { pathname: '/withdrawals' as const },
icon: 'arrows/north-east',
isActive: pathname === '/withdrawals',
Expand Down Expand Up @@ -182,7 +182,7 @@ export default function useNavItems(): ReturnType {
} : null,
{
text: 'Developer Docs',
icon: rocket,
icon: 'rocket',
url: 'https://docs.subspace.network/docs/developers/intro',
},
].filter(Boolean);
Expand Down Expand Up @@ -284,5 +284,5 @@ export default function useNavItems(): ReturnType {
};

return { mainNavItems, accountNavItems, profileItem };
}, [ pathname ]);
}, [pathname]);
}
21 changes: 0 additions & 21 deletions lib/tx/sortTxs.ts

This file was deleted.

34 changes: 16 additions & 18 deletions nextjs/PageNextJs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import useAdblockDetect from 'lib/hooks/useAdblockDetect';
import useGetCsrfToken from 'lib/hooks/useGetCsrfToken';
import * as metadata from 'lib/metadata';
import * as mixpanel from 'lib/mixpanel';
import { init as initSentry } from 'lib/sentry/config';

interface Props<Pathname extends Route['pathname']> {
pathname: Pathname;
Expand All @@ -18,7 +17,6 @@ interface Props<Pathname extends Route['pathname']> {
apiData?: PageProps<Pathname>['apiData'];
}

initSentry();

const PageNextJs = <Pathname extends Route['pathname']>(props: Props<Pathname>) => {
const { title, description, opengraph } = metadata.generate(props, props.apiData);
Expand All @@ -32,23 +30,23 @@ const PageNextJs = <Pathname extends Route['pathname']>(props: Props<Pathname>)
return (
<>
<Head>
<title>{ title }</title>
<meta name="description" content={ description }/>

{ /* OG TAGS */ }
<meta property="og:title" content={ opengraph.title }/>
{ opengraph.description && <meta property="og:description" content={ opengraph.description }/> }
<meta property="og:image" content={ opengraph.imageUrl }/>
<meta property="og:type" content="website"/>

{ /* Twitter Meta Tags */ }
<meta name="twitter:card" content="summary_large_image"/>
<meta property="twitter:domain" content={ config.app.host }/>
<meta name="twitter:title" content={ opengraph.title }/>
{ opengraph.description && <meta name="twitter:description" content={ opengraph.description }/> }
<meta property="twitter:image" content={ opengraph.imageUrl }/>
<title>{title}</title>
<meta name="description" content={description} />

{ /* OG TAGS */}
<meta property="og:title" content={opengraph.title} />
{opengraph.description && <meta property="og:description" content={opengraph.description} />}
<meta property="og:image" content={opengraph.imageUrl} />
<meta property="og:type" content="website" />

{ /* Twitter Meta Tags */}
<meta name="twitter:card" content="summary_large_image" />
<meta property="twitter:domain" content={config.app.host} />
<meta name="twitter:title" content={opengraph.title} />
{opengraph.description && <meta name="twitter:description" content={opengraph.description} />}
<meta property="twitter:image" content={opengraph.imageUrl} />
</Head>
{ props.children }
{props.children}
</>
);
};
Expand Down

0 comments on commit 9b2887e

Please sign in to comment.