Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

Commit a51409a

Browse files
authored
chore: docs comp cleanup (#2082)
* remove unused docs top navigation * remove unused typography components * remove unused card components * remove unused ConnectWalletButton components * added typed return for lint * fix lint * fix some lints * fix lints * remove unused components * fix lints and build warnings
1 parent 45f743e commit a51409a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+46
-3158
lines changed

apps/base-docs/docs/components/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use client';
2+
23
import { OnchainKitProvider } from '@coinbase/onchainkit';
34
import '@coinbase/onchainkit/styles.css';
45
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
@@ -8,6 +9,7 @@ import { base, baseSepolia } from 'wagmi/chains';
89
import { coinbaseWallet } from 'wagmi/connectors';
910
import { useTheme } from '../contexts/Theme.tsx';
1011
import { defineChain } from 'viem';
12+
1113
const queryClient = new QueryClient();
1214

1315
export const SANDBOX_CHAIN = defineChain({
@@ -65,9 +67,7 @@ export default function App({ children }: { children: ReactNode }) {
6567
},
6668
}}
6769
>
68-
<div style={{ display: 'flex', flexDirection: 'column' }}>
69-
{children}
70-
</div>
70+
<div style={{ display: 'flex', flexDirection: 'column' }}>{children}</div>
7171
</OnchainKitProvider>
7272
</QueryClientProvider>
7373
</WagmiProvider>
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
interface BrowseCardProps {
1+
type BrowseCardProps = {
22
title: string;
33
description: string;
44
icon: React.ReactNode;
55
href?: string;
6-
}
6+
};
77

88
export function BrowseCard({ title, description, icon, href }: BrowseCardProps) {
99
const CardWrapper = href ? 'a' : 'div';
10-
10+
1111
return (
12-
<CardWrapper
12+
<CardWrapper
1313
href={href}
14-
className="block h-full p-6 rounded-lg bg-zinc-100 dark:bg-zinc-900 hover:bg-zinc-200 dark:hover:bg-zinc-800 transition-colors"
14+
className="block h-full rounded-lg bg-zinc-100 p-6 transition-colors hover:bg-zinc-200 dark:bg-zinc-900 dark:hover:bg-zinc-800"
1515
>
1616
<div className="flex flex-col gap-4">
17-
<div className="h-12 w-12 text-blue-500">
18-
{icon}
19-
</div>
17+
<div className="h-12 w-12 text-blue-500">{icon}</div>
2018
<div>
21-
<h3 className="text-lg font-semibold text-white mb-1 my-4">{title}</h3>
19+
<h3 className="my-4 mb-1 text-lg font-semibold text-white">{title}</h3>
2220
<p className="text-zinc-400">{description}</p>
2321
</div>
2422
</div>
2523
</CardWrapper>
2624
);
27-
}
25+
}

apps/base-docs/docs/components/BrowseUseCaseCard.tsx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
1-
interface BrowseUseCaseCardProps {
1+
type BrowseUseCaseCardProps = {
22
title: string;
33
description: string;
44
icon: React.ReactNode;
55
href?: string;
6-
}
6+
};
77

88
export function BrowseUseCaseCard({ title, description, icon, href }: BrowseUseCaseCardProps) {
99
const CardWrapper = href ? 'a' : 'div';
1010

1111
return (
12-
<CardWrapper
13-
href={href}
14-
className="block h-[420px]"
15-
>
16-
<div className="flex flex-col h-full">
17-
<div className="h-[280px] w-full flex items-center dark:bg-zinc-900 justify-center mb-4 rounded-lg">
18-
<div className="w-[60%] mx-auto flex items-center justify-center">
19-
{icon}
20-
</div>
12+
<CardWrapper href={href} className="block h-[420px]">
13+
<div className="flex h-full flex-col">
14+
<div className="mb-4 flex h-[280px] w-full items-center justify-center rounded-lg dark:bg-zinc-900">
15+
<div className="mx-auto flex w-[60%] items-center justify-center">{icon}</div>
2116
</div>
2217

23-
<div className="flex flex-col flex-1">
24-
<h3 className="text-lg font-bold text-white mb-1">{title}</h3>
18+
<div className="flex flex-1 flex-col">
19+
<h3 className="mb-1 text-lg font-bold text-white">{title}</h3>
2520
<p className="text-zinc-400">{description}</p>
2621
</div>
2722
</div>

apps/base-docs/docs/components/Button/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import { ButtonHTMLAttributes } from 'react';
44
import classNames from 'classnames';
5-
import { ButtonVariants, ButtonSizes } from 'apps/web/src/components/base-org/Button/types';
6-
import { Icon, IconProps } from 'apps/web/src/components/Icon/Icon';
5+
import { Icon, IconProps } from '../base-org/Icon/Icon.tsx';
6+
import { ButtonVariants, ButtonSizes } from './types.ts';
77

88
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
99
connectWallet?: boolean;
@@ -87,7 +87,9 @@ export default function Button({
8787
return (
8888
<button type="button" onClick={onClick} disabled={disabled} className={buttonClasses}>
8989
<span>{children}</span>
90-
{iconName && <Icon name={iconName} width={iconSize} height={iconSize} color="currentColor" />}
90+
{iconName && (
91+
<Icon name={iconName as string} width={iconSize} height={iconSize} color="currentColor" />
92+
)}
9193
</button>
9294
);
9395
}

apps/base-docs/docs/components/BuyWrapper.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use client';
2+
23
import type { SwapError } from '@coinbase/onchainkit/swap';
34
import type { Token } from '@coinbase/onchainkit/token';
45
import { type ReactNode, useCallback } from 'react';

apps/base-docs/docs/components/ConnectWalletButton/ConnectWalletButton.tsx

Lines changed: 0 additions & 173 deletions
This file was deleted.

apps/base-docs/docs/components/ConnectWalletButton/UserAddress.tsx

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)