Skip to content

Commit

Permalink
fix: config
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsimao committed Dec 12, 2024
1 parent 90d20ee commit 8dc5b2b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 35 deletions.
3 changes: 2 additions & 1 deletion apps/evm/src/app/[lang]/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { State, WagmiProvider } from 'wagmi';
import { NestedProviders } from './nested-providers';

import { getConfig } from '@/lib/wagmi';
import { INTERVAL, isProd } from '@/constants';
import { ExternalLinks, INTERVAL, isProd } from '@/constants';
import { FetchError } from '@/types/fetch';

export function Providers({ initialState, children }: PropsWithChildren<{ initialState: State | undefined }>) {
Expand Down Expand Up @@ -47,6 +47,7 @@ export function Providers({ initialState, children }: PropsWithChildren<{ initia
return (
<DynamicContextProvider
settings={{
termsOfServiceUrl: ExternalLinks.TERMS_OF_SERVICE,
environmentId: process.env.NEXT_PUBLIC_DYNAMIC_ENVIRONMENT_ID as string,
walletConnectors: [BitcoinWalletConnectors, EthereumWalletConnectors],
overrides: {
Expand Down
16 changes: 6 additions & 10 deletions apps/evm/src/components/Layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ import { useLingui } from '@lingui/react';
import { useState } from 'react';
import { useTheme } from 'styled-components';

import { ConnectButton } from '../ConnectButton';
import { Logo } from '../Logo';
import { SocialsGroup } from '../SocialsGroup';
import { ConnectButton } from '../ConnectButton';

import { FusionPopover } from './FusionPopover';
import { StyledHeader, StyledLogoWrapper } from './Layout.style';
import { useLayoutContext } from './LayoutContext';
import { Nav } from './Nav';
import { NavItem } from './NavItem';

import { DocsLinks, RoutesPath } from '@/constants';
import { ExternalLinks, RoutesPath } from '@/constants';
import { useUserAgent } from '@/user-agent';

const Header = (): JSX.Element => {
Expand Down Expand Up @@ -85,20 +85,16 @@ const Header = (): JSX.Element => {
<PopoverContent hidden={isMobile}>
<PopoverBody onClick={() => setOpen(false)}>
<Nav direction='column'>
<NavItem
isExternal
href='https://cdn.prod.website-files.com/6620e8932695794632789d89/668eaca0c8c67436ee679ca0_GoBob%20-%20Terms%20of%20Service%20(LW%20draft%207-9)(149414568.5).pdf'
size='s'
>
<NavItem isExternal href={ExternalLinks.TERMS_OF_SERVICE} size='s'>
<Trans>T&Cs</Trans>
</NavItem>
<NavItem isExternal href={DocsLinks.HOME} size='s'>
<NavItem isExternal href={ExternalLinks.DOCS} size='s'>
<Trans>Dev</Trans>
</NavItem>
<NavItem isExternal href='https://gobob.xyz/' size='s'>
<NavItem isExternal href={ExternalLinks.HOMEPAGE} size='s'>
<Trans>About</Trans>
</NavItem>
<NavItem isExternal href='https://safe.gobob.xyz/welcome' size='s'>
<NavItem isExternal href={ExternalLinks.SAFE} size='s'>
<Trans>Multisig</Trans>
</NavItem>
</Nav>
Expand Down
13 changes: 5 additions & 8 deletions apps/evm/src/components/Layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useLayoutContext } from './LayoutContext';
import { Nav } from './Nav';
import { NavItem } from './NavItem';

import { DocsLinks, RoutesPath } from '@/constants';
import { ExternalLinks, RoutesPath } from '@/constants';

const Sidebar = (): JSX.Element | null => {
const { isSidebarOpen, setSidebarOpen } = useLayoutContext();
Expand Down Expand Up @@ -46,19 +46,16 @@ const Sidebar = (): JSX.Element | null => {
<NavItem href={RoutesPath.FUSION}>
<Trans>Fusion</Trans>
</NavItem>
<NavItem isExternal href='https://safe.gobob.xyz/welcome'>
<NavItem isExternal href={ExternalLinks.SAFE}>
<Trans>Multisig</Trans>
</NavItem>
<NavItem
isExternal
href='https://cdn.prod.website-files.com/6620e8932695794632789d89/668eaca0c8c67436ee679ca0_GoBob%20-%20Terms%20of%20Service%20(LW%20draft%207-9)(149414568.5).pdf'
>
<NavItem isExternal href={ExternalLinks.TERMS_OF_SERVICE}>
<Trans>T&Cs</Trans>
</NavItem>
<NavItem isExternal href={DocsLinks.HOME}>
<NavItem isExternal href={ExternalLinks.DOCS}>
<Trans>Dev</Trans>
</NavItem>
<NavItem isExternal href='https://gobob.xyz/'>
<NavItem isExternal href={ExternalLinks.HOMEPAGE}>
<Trans>About</Trans>
</NavItem>
</Nav>
Expand Down
13 changes: 10 additions & 3 deletions apps/evm/src/components/ProfileDrawer/ProfileEvmWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
import { useDynamicContext } from '@dynamic-labs/sdk-react-core';
import { WalletIcon } from '@dynamic-labs/wallet-book';
import { ETH } from '@gobob/icons';
import { Card, Flex, Span } from '@gobob/ui';
import { Card, Flex, Span, Tooltip, UnstyledButton } from '@gobob/ui';
import { truncateEthAddress } from '@gobob/utils';
import { useAccount } from 'wagmi';
import { Trans } from '@lingui/macro';
import { getCapitalizedChainName } from '@gobob/chains';

import { ChainAsset } from '../ChainAsset';
import { CopyAddress } from '../CopyAddress';

import { useBalances } from '@/hooks';
import { L1_CHAIN, L2_CHAIN } from '@/constants';

type ProfileEvmWalletProps = {
chainId: number;
Expand All @@ -25,7 +28,7 @@ const ProfileEvmWallet = ({ chainId }: ProfileEvmWalletProps): JSX.Element | nul

if (!primaryWallet) return null;

// const otherChain = chainId === L1_CHAIN ? L2_CHAIN : L1_CHAIN;
const otherChain = chainId === L1_CHAIN ? L2_CHAIN : L1_CHAIN;

return (
<Card
Expand All @@ -37,7 +40,11 @@ const ProfileEvmWallet = ({ chainId }: ProfileEvmWalletProps): JSX.Element | nul
padding='md'
>
<Flex alignItems='center' gap='md'>
<ChainAsset asset={<ETH size='xl' />} chainId={chainId} chainProps={{ size: 'xs' }} />
<Tooltip label={<Trans>Switch to {getCapitalizedChainName(otherChain)}</Trans>}>
<UnstyledButton>
<ChainAsset asset={<ETH size='xl' />} chainId={chainId} chainProps={{ size: 'xs' }} />
</UnstyledButton>
</Tooltip>
<Flex direction='column'>
<Span size='s' weight='semibold'>
{getBalance('ETH')?.toSignificant()} ETH
Expand Down
13 changes: 4 additions & 9 deletions apps/evm/src/components/SocialsGroup/SocialsGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Discord, Twitter } from '@gobob/icons';
import { t, Trans } from '@lingui/macro';
import { useLingui } from '@lingui/react';

import { DocsLinks } from '@/constants';
import { ExternalLinks } from '@/constants';

type Props = {
showDocs?: boolean;
Expand All @@ -27,23 +27,18 @@ const SocialsGroup = ({
<Flex gap={gap} justifyContent={justifyContent} {...props}>
{showDocs && (
<Button asChild isIconOnly size='s' variant={variant}>
<a href={DocsLinks.HOME} rel='noreferrer' target='_blank'>
<a href={ExternalLinks.DOCS} rel='noreferrer' target='_blank'>
<Trans>Docs</Trans>
</a>
</Button>
)}
<Button asChild isIconOnly size='s' variant={variant}>
<a
aria-label={t(i18n)`navigate to X social`}
href='https://twitter.com/build_on_bob'
rel='noreferrer'
target='_blank'
>
<a aria-label={t(i18n)`navigate to X social`} href={ExternalLinks.X} rel='noreferrer' target='_blank'>
<Twitter size='s' />
</a>
</Button>
<Button asChild isIconOnly size='s' variant={variant}>
<a aria-label={t(i18n)`navigate to discord`} href='https://discord.gg/gobob' rel='noreferrer' target='_blank'>
<a aria-label={t(i18n)`navigate to discord`} href={ExternalLinks.DISCORD} rel='noreferrer' target='_blank'>
<Discord size='s' />
</a>
</Button>
Expand Down
13 changes: 9 additions & 4 deletions apps/evm/src/constants/links.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const DocsLinks = {
HOME: 'https://docs.gobob.xyz/',
OP_STACK: 'https://docs.gobob.xyz/docs/learn/bob-stack/op-stack'
const ExternalLinks = {
HOMEPAGE: 'https://gobob.xyz/',
DOCS: 'https://docs.gobob.xyz/',
TERMS_OF_SERVICE:
'https://cdn.prod.website-files.com/6620e8932695794632789d89/668eaca0c8c67436ee679ca0_GoBob%20-%20Terms%20of%20Service%20(LW%20draft%207-9)(149414568.5).pdf',
SAFE: 'https://safe.gobob.xyz/welcome',
DISCORD: 'https://discord.gg/gobob',
X: 'https://x.com/build_on_bob'
};

export { DocsLinks };
export { ExternalLinks };

0 comments on commit 8dc5b2b

Please sign in to comment.