From f74ebb29774f5f0ce374c35d9dd9eacae4bd7ff3 Mon Sep 17 00:00:00 2001 From: evilpeach Date: Tue, 28 Nov 2023 16:22:07 +0700 Subject: [PATCH 1/2] fix: missing navbar --- CHANGELOG.md | 1 + src/lib/layout/navbar/index.tsx | 2 ++ src/lib/layout/navbar/utils.ts | 25 +++++++++++++++++++++++-- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f20acc30..9fb93435c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -106,6 +106,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Bug fixes +- [#638](https://github.com/alleslabs/celatone-frontend/pull/638) Fix this wallet nav bar section - [#623](https://github.com/alleslabs/celatone-frontend/pull/623) Fix abi empty vector serialization - [#619](https://github.com/alleslabs/celatone-frontend/pull/619) Fix observer, logo and disable delegation in Account Detail Page - [#617](https://github.com/alleslabs/celatone-frontend/pull/617) Fix textwrap module path on module detail, framer motion incorrect transition prop, loadingoverlay not centered diff --git a/src/lib/layout/navbar/index.tsx b/src/lib/layout/navbar/index.tsx index 644ff7424..165425787 100644 --- a/src/lib/layout/navbar/index.tsx +++ b/src/lib/layout/navbar/index.tsx @@ -21,6 +21,7 @@ import { getDevSubmenuMove, getDevSubmenuWasm, getDeviceSubmenuWasm, + getWalletSubSection, } from "./utils"; interface NavbarProps { @@ -88,6 +89,7 @@ const Navbar = observer(({ isExpand, setIsExpand }: NavbarProps) => { ...getDevSubmenuWasm(wasm.enabled), ], subSection: [ + ...getWalletSubSection(wasm.enabled), { category: "This Device", submenu: [ diff --git a/src/lib/layout/navbar/utils.ts b/src/lib/layout/navbar/utils.ts index 9edf27955..416a77e23 100644 --- a/src/lib/layout/navbar/utils.ts +++ b/src/lib/layout/navbar/utils.ts @@ -1,7 +1,7 @@ import { AmpEvent, track } from "lib/amplitude"; import type { IconKeys } from "lib/components/icon"; -import { SAVED_LIST_NAME } from "lib/data"; -import { formatSlugName } from "lib/utils"; +import { INSTANTIATED_LIST_NAME, SAVED_LIST_NAME } from "lib/data"; +import { formatSlugName, getListIcon } from "lib/utils"; export const getDevSubmenuMove = (isMove: boolean) => isMove @@ -61,6 +61,27 @@ export const getDevSubmenuWasm = (isWasm: boolean) => ] : []; +export const getWalletSubSection = (isWasm: boolean) => + isWasm + ? [ + { + category: "This Wallet", + submenu: [ + { + name: "My Stored Codes", + slug: "/stored-codes", + icon: "code" as IconKeys, + }, + { + name: INSTANTIATED_LIST_NAME, + slug: `/contract-lists/${formatSlugName(INSTANTIATED_LIST_NAME)}`, + icon: getListIcon(INSTANTIATED_LIST_NAME), + }, + ], + }, + ] + : []; + export const getDeviceSubmenuWasm = (isWasm: boolean) => isWasm ? [ From 5df59786e2129e9218a972f2406d0555d01f4b45 Mon Sep 17 00:00:00 2001 From: evilpeach Date: Tue, 28 Nov 2023 16:28:40 +0700 Subject: [PATCH 2/2] fix: pr number --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fb93435c..71b179e42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -106,7 +106,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Bug fixes -- [#638](https://github.com/alleslabs/celatone-frontend/pull/638) Fix this wallet nav bar section +- [#639](https://github.com/alleslabs/celatone-frontend/pull/639) Fix this wallet nav bar section - [#623](https://github.com/alleslabs/celatone-frontend/pull/623) Fix abi empty vector serialization - [#619](https://github.com/alleslabs/celatone-frontend/pull/619) Fix observer, logo and disable delegation in Account Detail Page - [#617](https://github.com/alleslabs/celatone-frontend/pull/617) Fix textwrap module path on module detail, framer motion incorrect transition prop, loadingoverlay not centered