From 2b2b4e0545c8f2decfd00a77a7ac0e79a1695607 Mon Sep 17 00:00:00 2001 From: Pavan Soratur Date: Wed, 18 Oct 2023 13:24:52 -0700 Subject: [PATCH] Create Tangle Dapp - EVM Staking App (#1777) Co-authored-by: Trung-Tin Pham <60747384+AtelyPham@users.noreply.github.com> --- .gitignore | 2 +- .../components/sideBar/SideBar.tsx | 3 +- .../hubble-stats/containers/Layout/Layout.tsx | 5 +- apps/tangle-dapp/.eslintrc.json | 31 ++++++ apps/tangle-dapp/.vscode/settings.json | 4 + apps/tangle-dapp/README.md | 19 ++++ apps/tangle-dapp/app/api/hello/route.ts | 3 + apps/tangle-dapp/app/layout.tsx | 55 ++++++++++ apps/tangle-dapp/app/page.tsx | 3 + apps/tangle-dapp/components/index.ts | 1 + .../components/sideBar/SideBar.tsx | 23 +++++ .../components/sideBar/SideBarMenu.tsx | 12 +++ apps/tangle-dapp/components/sideBar/index.tsx | 2 + .../components/sideBar/sideBarProps.tsx | 97 ++++++++++++++++++ apps/tangle-dapp/containers/Layout/Layout.tsx | 35 +++++++ apps/tangle-dapp/containers/Layout/index.ts | 1 + apps/tangle-dapp/containers/index.ts | 1 + apps/tangle-dapp/index.d.ts | 6 ++ apps/tangle-dapp/jest.config.ts | 11 ++ apps/tangle-dapp/next-env.d.ts | 5 + apps/tangle-dapp/next.config.js | 48 +++++++++ apps/tangle-dapp/postcss.config.js | 17 +++ apps/tangle-dapp/project.json | 68 ++++++++++++ apps/tangle-dapp/public/.gitkeep | 0 apps/tangle-dapp/public/favicon.ico | Bin 0 -> 15086 bytes .../public/static/assets/bg-dark.jpeg | Bin 0 -> 101853 bytes apps/tangle-dapp/public/static/assets/bg.jpeg | Bin 0 -> 100024 bytes apps/tangle-dapp/tailwind.config.js | 23 +++++ apps/tangle-dapp/tsconfig.json | 37 +++++++ apps/tangle-dapp/tsconfig.spec.json | 21 ++++ libs/abstract-api-provider/tsconfig.json | 1 - libs/api-provider-environment/tsconfig.json | 1 - libs/browser-utils/tsconfig.json | 1 - .../src/wallets/wallets-config.tsx | 2 +- libs/icons/tsconfig.json | 1 - libs/tailwind-preset/tsconfig.json | 1 - .../src/components/ChainChip/types.ts | 2 +- .../src/components/buttons/types.ts | 2 +- .../webb-ui-components/src/constants/index.ts | 1 + .../src/next-utils/index.ts | 1 + .../src/next-utils/sideBarState.ts | 2 +- package.json | 2 + 42 files changed, 535 insertions(+), 15 deletions(-) create mode 100644 apps/tangle-dapp/.eslintrc.json create mode 100644 apps/tangle-dapp/.vscode/settings.json create mode 100644 apps/tangle-dapp/README.md create mode 100644 apps/tangle-dapp/app/api/hello/route.ts create mode 100644 apps/tangle-dapp/app/layout.tsx create mode 100644 apps/tangle-dapp/app/page.tsx create mode 100644 apps/tangle-dapp/components/index.ts create mode 100644 apps/tangle-dapp/components/sideBar/SideBar.tsx create mode 100644 apps/tangle-dapp/components/sideBar/SideBarMenu.tsx create mode 100644 apps/tangle-dapp/components/sideBar/index.tsx create mode 100644 apps/tangle-dapp/components/sideBar/sideBarProps.tsx create mode 100644 apps/tangle-dapp/containers/Layout/Layout.tsx create mode 100644 apps/tangle-dapp/containers/Layout/index.ts create mode 100644 apps/tangle-dapp/containers/index.ts create mode 100644 apps/tangle-dapp/index.d.ts create mode 100644 apps/tangle-dapp/jest.config.ts create mode 100644 apps/tangle-dapp/next-env.d.ts create mode 100644 apps/tangle-dapp/next.config.js create mode 100644 apps/tangle-dapp/postcss.config.js create mode 100644 apps/tangle-dapp/project.json create mode 100644 apps/tangle-dapp/public/.gitkeep create mode 100644 apps/tangle-dapp/public/favicon.ico create mode 100644 apps/tangle-dapp/public/static/assets/bg-dark.jpeg create mode 100644 apps/tangle-dapp/public/static/assets/bg.jpeg create mode 100644 apps/tangle-dapp/tailwind.config.js create mode 100644 apps/tangle-dapp/tsconfig.json create mode 100644 apps/tangle-dapp/tsconfig.spec.json create mode 100644 libs/webb-ui-components/src/next-utils/index.ts rename apps/hubble-stats/components/sideBar/sideBarActions.ts => libs/webb-ui-components/src/next-utils/sideBarState.ts (87%) diff --git a/.gitignore b/.gitignore index cfe2a992b9..f4f82743cb 100644 --- a/.gitignore +++ b/.gitignore @@ -95,4 +95,4 @@ apps/stats-dapp/graphql.schema.json .direnv # Generated by json files -/**/generated/**/*.json +/**/generated/**/*.json \ No newline at end of file diff --git a/apps/hubble-stats/components/sideBar/SideBar.tsx b/apps/hubble-stats/components/sideBar/SideBar.tsx index 288e786f73..c26e07de19 100644 --- a/apps/hubble-stats/components/sideBar/SideBar.tsx +++ b/apps/hubble-stats/components/sideBar/SideBar.tsx @@ -2,8 +2,7 @@ import { type FC } from 'react'; import { SideBar as SideBarCmp } from '@webb-tools/webb-ui-components'; - -import { setSideBarCookieOnToggle } from './sideBarActions'; +import { setSideBarCookieOnToggle } from '@webb-tools/webb-ui-components/next-utils'; import sideBarProps from './sideBarProps'; interface SideBarProps { diff --git a/apps/hubble-stats/containers/Layout/Layout.tsx b/apps/hubble-stats/containers/Layout/Layout.tsx index 525371318a..f21704a7c1 100644 --- a/apps/hubble-stats/containers/Layout/Layout.tsx +++ b/apps/hubble-stats/containers/Layout/Layout.tsx @@ -1,8 +1,7 @@ import React, { type PropsWithChildren, type FC } from 'react'; import { Footer } from '@webb-tools/webb-ui-components'; - import { HeaderChipsContainer } from '..'; -import { getSideBarStateFromCookie } from '../../components/sideBar/sideBarActions'; +import { getSideBarStateFromCookie } from '@webb-tools/webb-ui-components/next-utils'; import { Breadcrumbs, SideBar, SideBarMenu } from '../../components'; const Layout: FC = ({ children }) => { @@ -28,7 +27,7 @@ const Layout: FC = ({ children }) => { {/* Footer */} -