Skip to content

Commit

Permalink
refactor(console): remove address book feature from console
Browse files Browse the repository at this point in the history
  • Loading branch information
Redm4x committed Aug 28, 2024
1 parent b605699 commit 605d0d5
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 373 deletions.
3 changes: 0 additions & 3 deletions apps/deploy-web/src/components/layout/AccountMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ export function AccountMenu() {
<CustomDropdownLinkItem onClick={() => window.open("https://blockspy.io", "_blank")?.focus()} icon={<Bell />}>
My Alerts
</CustomDropdownLinkItem>
<CustomDropdownLinkItem onClick={() => router.push(UrlService.userAddressBook())} icon={<Book />}>
Addresses
</CustomDropdownLinkItem>
<DropdownMenuSeparator />
<CustomDropdownLinkItem onClick={() => router.push(UrlService.logout())} icon={<LogOut />}>
Logout
Expand Down
8 changes: 0 additions & 8 deletions apps/deploy-web/src/components/layout/MobileSidebarUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ export const MobileSidebarUser: React.FunctionComponent = () => {
}}
/>
)}
<SidebarRouteButton
route={{
title: "Addresses",
icon: props => <BookStack {...props} />,
url: UrlService.userAddressBook(),
activeRoutes: [UrlService.userAddressBook()]
}}
/>
<SidebarRouteButton
route={{
title: "Settings",
Expand Down
95 changes: 0 additions & 95 deletions apps/deploy-web/src/components/user/AddressBookTable.tsx

This file was deleted.

8 changes: 2 additions & 6 deletions apps/deploy-web/src/components/user/UserProfileLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useCustomUser } from "@src/hooks/useCustomUser";
import { AnalyticsEvents } from "@src/utils/analytics";
import { UrlService } from "@src/utils/urlUtils";

type UserProfileTab = "templates" | "favorites" | "address-book" | "settings";
type UserProfileTab = "templates" | "favorites" | "settings";
type Props = {
username?: string;
bio?: string;
Expand All @@ -33,9 +33,6 @@ export const UserProfileLayout: React.FunctionComponent<Props> = ({ page, childr
case "favorites":
router.push(UrlService.userFavorites());
break;
case "address-book":
router.push(UrlService.userAddressBook());
break;
case "settings":
router.push(UrlService.userSettings());
break;
Expand All @@ -51,12 +48,11 @@ export const UserProfileLayout: React.FunctionComponent<Props> = ({ page, childr
</div>

<Tabs value={page} onValueChange={handleTabChange}>
<TabsList className="mb-4 grid w-full grid-cols-4 border-b">
<TabsList className="mb-4 grid w-full grid-cols-3 border-b">
<TabsTrigger value="templates">Templates</TabsTrigger>
{user?.username === username && (
<>
<TabsTrigger value="favorites">Favorites</TabsTrigger>
<TabsTrigger value="address-book">Address Book</TabsTrigger>
<TabsTrigger value="settings">Settings</TabsTrigger>
</>
)}
Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion apps/deploy-web/src/context/AddressBookProvider/index.ts

This file was deleted.

47 changes: 22 additions & 25 deletions apps/deploy-web/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import GoogleAnalytics from "@src/components/layout/CustomGoogleAnalytics";
import { CustomIntlProvider } from "@src/components/layout/CustomIntlProvider";
import { PageHead } from "@src/components/layout/PageHead";
import { UserProviders } from "@src/components/user/UserProviders";
import { AddressBookProvider } from "@src/context/AddressBookProvider";
import { BackgroundTaskProvider } from "@src/context/BackgroundTaskProvider";
import { CertificateProvider } from "@src/context/CertificateProvider";
import { ChainParamProvider } from "@src/context/ChainParamProvider";
Expand Down Expand Up @@ -59,30 +58,28 @@ const App: React.FunctionComponent<Props> = props => {
<CustomSnackbarProvider>
<UserProviders>
<PricingProvider>
<AddressBookProvider>
<TooltipProvider>
<SettingsProvider>
<CustomChainProvider>
<PopupProvider>
<WalletProvider>
<ChainParamProvider>
<CertificateProvider>
<BackgroundTaskProvider>
<TemplatesProvider>
<LocalNoteProvider>
<GoogleAnalytics />
<Component {...pageProps} />
</LocalNoteProvider>
</TemplatesProvider>
</BackgroundTaskProvider>
</CertificateProvider>
</ChainParamProvider>
</WalletProvider>
</PopupProvider>
</CustomChainProvider>
</SettingsProvider>
</TooltipProvider>
</AddressBookProvider>
<TooltipProvider>
<SettingsProvider>
<CustomChainProvider>
<PopupProvider>
<WalletProvider>
<ChainParamProvider>
<CertificateProvider>
<BackgroundTaskProvider>
<TemplatesProvider>
<LocalNoteProvider>
<GoogleAnalytics />
<Component {...pageProps} />
</LocalNoteProvider>
</TemplatesProvider>
</BackgroundTaskProvider>
</CertificateProvider>
</ChainParamProvider>
</WalletProvider>
</PopupProvider>
</CustomChainProvider>
</SettingsProvider>
</TooltipProvider>
</PricingProvider>
</UserProviders>
</CustomSnackbarProvider>
Expand Down
Loading

0 comments on commit 605d0d5

Please sign in to comment.