Skip to content

Commit

Permalink
fix: as commented
Browse files Browse the repository at this point in the history
  • Loading branch information
poomthiti committed Jan 27, 2023
1 parent ab18df8 commit b460f83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/lib/components/modal/contract/AddToOtherList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ export const AddToOtherList = observer(
});

useEffect(() => {
if (contractLocalInfo.lists?.length) {
setContractLists(contractLocalInfo.lists);
} else {
setContractLists(DEFAULT_LIST);
}
setContractLists(
contractLocalInfo.lists?.length ? contractLocalInfo.lists : DEFAULT_LIST
);
}, [contractLocalInfo.lists]);

return (
Expand Down Expand Up @@ -73,7 +71,7 @@ export const AddToOtherList = observer(
placeholder="Add to contract lists"
helperText="Grouping your contracts by adding to your existing list or create
a new list"
setResult={(selectedList) => setContractLists(selectedList)}
setResult={setContractLists}
labelBgColor="gray.800"
/>
</Box>
Expand Down
3 changes: 3 additions & 0 deletions src/lib/data/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { MdBookmark, MdInbox, MdLibraryBooks } from "react-icons/md";

import type { LVPair } from "lib/types";
import { MsgType } from "lib/types";
/**
* @todos Revisit utils import later
*/
import { formatSlugName } from "lib/utils/format";

export const INSTANTIATED_LIST_NAME = "Instantiated by me";
Expand Down

0 comments on commit b460f83

Please sign in to comment.