Skip to content

Commit

Permalink
minor refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
brendan-defi committed Nov 12, 2024
1 parent 59d4b5f commit 928c8ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions apps/web/app/CryptoProviders.dynamic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import { useEffect, useState } from 'react';
import { useErrors } from 'apps/web/contexts/Errors';

// RigidBody cannot be imported using dynamic() due to some import issues
export function DynamicCryptoProviders({ children }: { children: React.ReactNode }) {
const [CryptoProvidersDynamic, setCryptoProvidersDynamic] = useState<React.ComponentType<{ children: React.ReactNode }>>();
const [CryptoProvidersDynamic, setCryptoProvidersDynamic] =
useState<React.ComponentType<{ children: React.ReactNode }>>();
const { logError } = useErrors();

// Import needs to happens on render
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,11 @@ const links: TopNavigationLink[] = [
},
];

const cryptoExcludedPaths = ['/jobs', '/about', '/ecosystem', '/getstarted'];

export default function TopNavigation() {
const pathname = usePathname();
const showGasDropdownAndConnectWallet = ![
'/jobs',
'/about',
'/ecosystem',
'/getstarted',
].includes(pathname ?? '');
const showGasDropdownAndConnectWallet = !cryptoExcludedPaths.includes(pathname ?? '');
return (
<AnalyticsProvider context="navbar">
<nav className="fixed top-0 z-50 w-full shrink-0 px-[1rem] py-4 md:px-[1.5rem] lg:px-[2rem]">
Expand Down

0 comments on commit 928c8ea

Please sign in to comment.