Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing navbar to develop #639

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Bug fixes

- [#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
Expand Down
2 changes: 2 additions & 0 deletions src/lib/layout/navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
getDevSubmenuMove,
getDevSubmenuWasm,
getDeviceSubmenuWasm,
getWalletSubSection,
} from "./utils";

interface NavbarProps {
Expand Down Expand Up @@ -88,6 +89,7 @@ const Navbar = observer(({ isExpand, setIsExpand }: NavbarProps) => {
...getDevSubmenuWasm(wasm.enabled),
],
subSection: [
...getWalletSubSection(wasm.enabled),
{
category: "This Device",
submenu: [
Expand Down
25 changes: 23 additions & 2 deletions src/lib/layout/navbar/utils.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
? [
Expand Down
Loading