From 568247e5239aa9b736b7fec23cf87b76e3b6d755 Mon Sep 17 00:00:00 2001 From: JCNoguera <88061365+VmMad@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:28:08 +0100 Subject: [PATCH] feat(wallet-dashboard): add missing link for `AllianceNo2` (#3825) * feat(wallet-dashboard): add missing link for AllianceNo2 * fix: update names * fix: add missing import --- apps/wallet-dashboard/app/layout.tsx | 63 +++++-------------- .../wallet-dashboard/components/FontLinks.tsx | 8 +++ .../providers/AppProviders.tsx | 55 ++++++++++++++++ apps/wallet-dashboard/providers/index.ts | 4 ++ 4 files changed, 81 insertions(+), 49 deletions(-) create mode 100644 apps/wallet-dashboard/components/FontLinks.tsx create mode 100644 apps/wallet-dashboard/providers/AppProviders.tsx create mode 100644 apps/wallet-dashboard/providers/index.ts diff --git a/apps/wallet-dashboard/app/layout.tsx b/apps/wallet-dashboard/app/layout.tsx index 8ab39e6129c..ddbf2f00280 100644 --- a/apps/wallet-dashboard/app/layout.tsx +++ b/apps/wallet-dashboard/app/layout.tsx @@ -1,67 +1,32 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -'use client'; -import './globals.css'; import '@iota/dapp-kit/dist/index.css'; +import './globals.css'; import { Inter } from 'next/font/google'; -import { GrowthBookProvider } from '@growthbook/growthbook-react'; -import { IotaClientProvider, lightTheme, darkTheme, WalletProvider } from '@iota/dapp-kit'; -import { getAllNetworks, getDefaultNetwork } from '@iota/iota-sdk/client'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import React from 'react'; -import '@iota/dapp-kit/dist/index.css'; -import { Popup, PopupProvider } from '@/components/Popup'; -import { growthbook } from '@/lib/utils'; -import { Toaster } from 'react-hot-toast'; -import { ThemeProvider } from '@/contexts'; +import { Metadata } from 'next'; +import { AppProviders } from '@/providers'; +import { FontLinks } from '@/components/FontLinks'; const inter = Inter({ subsets: ['latin'] }); -growthbook.init(); + +export const metadata: Metadata = { + title: 'IOTA Wallet Dashboard', + description: 'IOTA Wallet Dashboard', +}; export default function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { - const [queryClient] = React.useState(() => new QueryClient()); - const bodyRef = React.useRef(null); - - const allNetworks = getAllNetworks(); - const defaultNetwork = getDefaultNetwork(); - return ( - - - - - - - - {children} - - - - - - - - + + + + {children} + ); diff --git a/apps/wallet-dashboard/components/FontLinks.tsx b/apps/wallet-dashboard/components/FontLinks.tsx new file mode 100644 index 00000000000..4bdf04eb80e --- /dev/null +++ b/apps/wallet-dashboard/components/FontLinks.tsx @@ -0,0 +1,8 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +const ALLIANCE_NO2_FONT_URL = 'https://webassets.iota.org/api/protected?face=alliance-no2'; + +export function FontLinks() { + return ; +} diff --git a/apps/wallet-dashboard/providers/AppProviders.tsx b/apps/wallet-dashboard/providers/AppProviders.tsx new file mode 100644 index 00000000000..48561b1ff27 --- /dev/null +++ b/apps/wallet-dashboard/providers/AppProviders.tsx @@ -0,0 +1,55 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +'use client'; + +import { PopupProvider } from '@/components'; +import { GrowthBookProvider } from '@growthbook/growthbook-react'; +import { IotaClientProvider, lightTheme, darkTheme, WalletProvider } from '@iota/dapp-kit'; +import { getAllNetworks, getDefaultNetwork } from '@iota/iota-sdk/client'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { useState } from 'react'; +import { growthbook } from '@/lib/utils'; +import { Popup } from '@/components/Popup'; +import { Toaster } from 'react-hot-toast'; +import { ThemeProvider } from '@/contexts'; + +growthbook.init(); + +export function AppProviders({ children }: React.PropsWithChildren) { + const [queryClient] = useState(() => new QueryClient()); + const allNetworks = getAllNetworks(); + const defaultNetwork = getDefaultNetwork(); + + return ( + + + + + + + {children} + + + + + + + + + ); +} diff --git a/apps/wallet-dashboard/providers/index.ts b/apps/wallet-dashboard/providers/index.ts new file mode 100644 index 00000000000..88cb32e927a --- /dev/null +++ b/apps/wallet-dashboard/providers/index.ts @@ -0,0 +1,4 @@ +// Copyright (c) 2024 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +export * from './AppProviders';