diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d97ded05..6117dad48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Bug fixes +- [#965](https://github.com/alleslabs/celatone-frontend/pull/965) Add search not found state in module detail - [#946](https://github.com/alleslabs/celatone-frontend/pull/946) Fix token card - [#941](https://github.com/alleslabs/celatone-frontend/pull/941) Fix contract interaction routing - [#936](https://github.com/alleslabs/celatone-frontend/pull/936) Fix mobile search not focusable diff --git a/next-env.d.ts b/next-env.d.ts index fd36f9494..4f11a03dc 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,5 @@ /// /// -/// // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/src/lib/pages/module-details/components/ModuleStructs.tsx b/src/lib/pages/module-details/components/ModuleStructs.tsx index 7a61d0a78..66555b9a4 100644 --- a/src/lib/pages/module-details/components/ModuleStructs.tsx +++ b/src/lib/pages/module-details/components/ModuleStructs.tsx @@ -5,6 +5,7 @@ import { trackUseExpandAll, trackUseViewJSON } from "lib/amplitude"; import { CustomIcon } from "lib/components/icon"; import InputWithIcon from "lib/components/InputWithIcon"; import { StructCard } from "lib/components/module/StructCard"; +import { EmptyState } from "lib/components/state"; import type { IndexedModule } from "lib/types"; interface ModuleStructsProps { @@ -107,11 +108,20 @@ export const ModuleStructs = ({ structs }: ModuleStructsProps) => { index={expandedIndexes} onChange={updateExpandedIndexes} > - - {filteredStructs.map((item) => ( - - ))} - + {filteredStructs.length ? ( + + {filteredStructs.map((item) => ( + + ))} + + ) : ( + + )} ); diff --git a/src/lib/pages/module-details/components/module-fns/FunctionTypeSwitch.tsx b/src/lib/pages/module-details/components/module-fns/FunctionTypeSwitch.tsx index af463b3d2..61654ea8d 100644 --- a/src/lib/pages/module-details/components/module-fns/FunctionTypeSwitch.tsx +++ b/src/lib/pages/module-details/components/module-fns/FunctionTypeSwitch.tsx @@ -72,12 +72,15 @@ export const FunctionTypeSwitch = ({ ))} + - - {fns.map((fn) => ( - - ))} - + {fns.length ? ( + + {fns.map((fn) => ( + + ))} + + ) : ( + + )} );